1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "base/base_switches.h"
6 #include "build/build_config.h"
7 
8 namespace switches {
9 
10 // Disables the crash reporting.
11 const char kDisableBreakpad[]               = "disable-breakpad";
12 
13 // Indicates that crash reporting should be enabled. On platforms where helper
14 // processes cannot access to files needed to make this decision, this flag is
15 // generated internally.
16 const char kEnableCrashReporter[]           = "enable-crash-reporter";
17 
18 // Makes memory allocators keep track of their allocations and context, so a
19 // detailed breakdown of memory usage can be presented in chrome://tracing when
20 // the memory-infra category is enabled.
21 const char kEnableHeapProfiling[]           = "enable-heap-profiling";
22 
23 // Generates full memory crash dump.
24 const char kFullMemoryCrashReport[]         = "full-memory-crash-report";
25 
26 // Force low-end device mode when set.
27 const char kEnableLowEndDeviceMode[]        = "enable-low-end-device-mode";
28 
29 // Force disabling of low-end device mode when set.
30 const char kDisableLowEndDeviceMode[]       = "disable-low-end-device-mode";
31 
32 // This option can be used to force field trials when testing changes locally.
33 // The argument is a list of name and value pairs, separated by slashes. If a
34 // trial name is prefixed with an asterisk, that trial will start activated.
35 // For example, the following argument defines two trials, with the second one
36 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/" This option can
37 // also be used by the browser process to send the list of trials to a
38 // non-browser process, using the same format. See
39 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
40 const char kForceFieldTrials[]              = "force-fieldtrials";
41 
42 // Suppresses all error dialogs when present.
43 const char kNoErrorDialogs[]                = "noerrdialogs";
44 
45 // When running certain tests that spawn child processes, this switch indicates
46 // to the test framework that the current process is a child process.
47 const char kTestChildProcess[]              = "test-child-process";
48 
49 // Gives the default maximal active V-logging level; 0 is the default.
50 // Normally positive values are used for V-logging levels.
51 const char kV[]                             = "v";
52 
53 // Gives the per-module maximal V-logging levels to override the value
54 // given by --v.  E.g. "my_module=2,foo*=3" would change the logging
55 // level for all code in source files "my_module.*" and "foo*.*"
56 // ("-inl" suffixes are also disregarded for this matching).
57 //
58 // Any pattern containing a forward or backward slash will be tested
59 // against the whole pathname and not just the module.  E.g.,
60 // "*/foo/bar/*=2" would change the logging level for all code in
61 // source files under a "foo/bar" directory.
62 const char kVModule[]                       = "vmodule";
63 
64 // Will wait for 60 seconds for a debugger to come to attach to the process.
65 const char kWaitForDebugger[]               = "wait-for-debugger";
66 
67 // Sends trace events from these categories to a file.
68 // --trace-to-file on its own sends to default categories.
69 const char kTraceToFile[]                   = "trace-to-file";
70 
71 // Specifies the file name for --trace-to-file. If unspecified, it will
72 // go to a default file name.
73 const char kTraceToFileName[]               = "trace-to-file-name";
74 
75 // Configure whether chrome://profiler will contain timing information. This
76 // option is enabled by default. A value of "0" will disable profiler timing,
77 // while all other values will enable it.
78 const char kProfilerTiming[]                = "profiler-timing";
79 // Value of the --profiler-timing flag that will disable timing information for
80 // chrome://profiler.
81 const char kProfilerTimingDisabledValue[]   = "0";
82 
83 #if defined(OS_WIN)
84 // Disables the USB keyboard detection for blocking the OSK on Win8+.
85 const char kDisableUsbKeyboardDetect[]      = "disable-usb-keyboard-detect";
86 #endif
87 
88 #if defined(OS_POSIX)
89 // Used for turning on Breakpad crash reporting in a debug environment where
90 // crash reporting is typically compiled but disabled.
91 const char kEnableCrashReporterForTesting[] =
92     "enable-crash-reporter-for-testing";
93 #endif
94 
95 }  // namespace switches
96