tfarina@chromium.org | ef21d1d | 2012-03-13 00:35:12 +0900 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | f003cfe | 2008-08-24 09:55:55 +0900 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 4 | |
| 5 | #include "base/base_switches.h" |
avi | a6a6a68 | 2015-12-27 07:15:14 +0900 | [diff] [blame] | 6 | #include "build/build_config.h" |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 7 | |
| 8 | namespace switches { |
| 9 | |
nsylvain@chromium.org | 12ec1e8 | 2010-08-10 02:32:32 +0900 | [diff] [blame] | 10 | // Disables the crash reporting. |
| 11 | const char kDisableBreakpad[] = "disable-breakpad"; |
| 12 | |
jochen@chromium.org | 22bb79e | 2013-10-23 06:19:01 +0900 | [diff] [blame] | 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 | |
ruuda | 576f92c | 2015-10-12 21:30:41 +0900 | [diff] [blame] | 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 | |
dskiba | 12405d9 | 2016-04-29 04:40:29 +0900 | [diff] [blame] | 23 | // Report native (walk the stack) allocation traces. By default pseudo stacks |
| 24 | // derived from trace events are reported. |
| 25 | const char kEnableHeapProfilingModeNative[] = "native"; |
| 26 | |
siggi | 3d119c4 | 2017-02-17 01:23:54 +0900 | [diff] [blame] | 27 | // Report per-task heap usage and churn in the task profiler. |
| 28 | // Does not keep track of individual allocations unlike the default and native |
| 29 | // mode. Keeps only track of summarized churn stats in the task profiler |
| 30 | // (chrome://profiler). |
| 31 | const char kEnableHeapProfilingTaskProfiler[] = "task-profiler"; |
| 32 | |
brettw@chromium.org | 1c8c3be | 2010-08-18 04:40:11 +0900 | [diff] [blame] | 33 | // Generates full memory crash dump. |
| 34 | const char kFullMemoryCrashReport[] = "full-memory-crash-report"; |
| 35 | |
ssid | 108428f | 2014-12-17 01:04:02 +0900 | [diff] [blame] | 36 | // Force low-end device mode when set. |
| 37 | const char kEnableLowEndDeviceMode[] = "enable-low-end-device-mode"; |
| 38 | |
| 39 | // Force disabling of low-end device mode when set. |
| 40 | const char kDisableLowEndDeviceMode[] = "disable-low-end-device-mode"; |
c.shu@samsung.com | da21aff | 2014-06-27 01:55:27 +0900 | [diff] [blame] | 41 | |
blundell | 6c9e3db | 2015-09-29 21:33:35 +0900 | [diff] [blame] | 42 | // This option can be used to force field trials when testing changes locally. |
| 43 | // The argument is a list of name and value pairs, separated by slashes. If a |
| 44 | // trial name is prefixed with an asterisk, that trial will start activated. |
| 45 | // For example, the following argument defines two trials, with the second one |
| 46 | // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/" This option can |
| 47 | // also be used by the browser process to send the list of trials to a |
| 48 | // non-browser process, using the same format. See |
| 49 | // FieldTrialList::CreateTrialsFromString() in field_trial.h for details. |
| 50 | const char kForceFieldTrials[] = "force-fieldtrials"; |
| 51 | |
brettw@chromium.org | 1c8c3be | 2010-08-18 04:40:11 +0900 | [diff] [blame] | 52 | // Suppresses all error dialogs when present. |
| 53 | const char kNoErrorDialogs[] = "noerrdialogs"; |
| 54 | |
brettw@chromium.org | 1c8c3be | 2010-08-18 04:40:11 +0900 | [diff] [blame] | 55 | // When running certain tests that spawn child processes, this switch indicates |
| 56 | // to the test framework that the current process is a child process. |
| 57 | const char kTestChildProcess[] = "test-child-process"; |
| 58 | |
wfh | 4422638 | 2016-03-12 11:09:59 +0900 | [diff] [blame] | 59 | // When running certain tests that spawn child processes, this switch indicates |
| 60 | // to the test framework that the current process should not initialize ICU to |
| 61 | // avoid creating any scoped handles too early in startup. |
| 62 | const char kTestDoNotInitializeIcu[] = "test-do-not-initialize-icu"; |
| 63 | |
akalin@chromium.org | f0ee79c | 2010-09-30 04:26:36 +0900 | [diff] [blame] | 64 | // Gives the default maximal active V-logging level; 0 is the default. |
| 65 | // Normally positive values are used for V-logging levels. |
| 66 | const char kV[] = "v"; |
| 67 | |
| 68 | // Gives the per-module maximal V-logging levels to override the value |
| 69 | // given by --v. E.g. "my_module=2,foo*=3" would change the logging |
| 70 | // level for all code in source files "my_module.*" and "foo*.*" |
| 71 | // ("-inl" suffixes are also disregarded for this matching). |
akalin@chromium.org | 859d7d4 | 2010-10-29 09:39:48 +0900 | [diff] [blame] | 72 | // |
| 73 | // Any pattern containing a forward or backward slash will be tested |
| 74 | // against the whole pathname and not just the module. E.g., |
| 75 | // "*/foo/bar/*=2" would change the logging level for all code in |
| 76 | // source files under a "foo/bar" directory. |
akalin@chromium.org | f0ee79c | 2010-09-30 04:26:36 +0900 | [diff] [blame] | 77 | const char kVModule[] = "vmodule"; |
| 78 | |
brettw@chromium.org | 1c8c3be | 2010-08-18 04:40:11 +0900 | [diff] [blame] | 79 | // Will wait for 60 seconds for a debugger to come to attach to the process. |
| 80 | const char kWaitForDebugger[] = "wait-for-debugger"; |
| 81 | |
enne | 7002b80 | 2014-09-26 04:49:56 +0900 | [diff] [blame] | 82 | // Sends trace events from these categories to a file. |
| 83 | // --trace-to-file on its own sends to default categories. |
| 84 | const char kTraceToFile[] = "trace-to-file"; |
| 85 | |
| 86 | // Specifies the file name for --trace-to-file. If unspecified, it will |
| 87 | // go to a default file name. |
| 88 | const char kTraceToFileName[] = "trace-to-file-name"; |
| 89 | |
qsr@chromium.org | 4b1cc32 | 2013-12-11 21:49:17 +0900 | [diff] [blame] | 90 | // Configure whether chrome://profiler will contain timing information. This |
| 91 | // option is enabled by default. A value of "0" will disable profiler timing, |
| 92 | // while all other values will enable it. |
| 93 | const char kProfilerTiming[] = "profiler-timing"; |
| 94 | // Value of the --profiler-timing flag that will disable timing information for |
| 95 | // chrome://profiler. |
| 96 | const char kProfilerTimingDisabledValue[] = "0"; |
| 97 | |
fsamuel | 21f4934 | 2016-07-09 08:02:44 +0900 | [diff] [blame] | 98 | // Specifies a location for profiling output. This will only work if chrome has |
| 99 | // been built with the gyp variable profiling=1 or gn arg enable_profiling=true. |
| 100 | // |
| 101 | // {pid} if present will be replaced by the pid of the process. |
| 102 | // {count} if present will be incremented each time a profile is generated |
| 103 | // for this process. |
| 104 | // The default is chrome-profile-{pid} for the browser and test-profile-{pid} |
| 105 | // for tests. |
| 106 | const char kProfilingFile[] = "profiling-file"; |
| 107 | |
jschuh | 0bf79e2 | 2015-06-23 22:36:28 +0900 | [diff] [blame] | 108 | #if defined(OS_WIN) |
| 109 | // Disables the USB keyboard detection for blocking the OSK on Win8+. |
| 110 | const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect"; |
| 111 | #endif |
| 112 | |
jochen@chromium.org | c108733 | 2013-11-07 17:35:29 +0900 | [diff] [blame] | 113 | #if defined(OS_POSIX) |
| 114 | // Used for turning on Breakpad crash reporting in a debug environment where |
| 115 | // crash reporting is typically compiled but disabled. |
| 116 | const char kEnableCrashReporterForTesting[] = |
| 117 | "enable-crash-reporter-for-testing"; |
| 118 | #endif |
| 119 | |
initial.commit | 3f4a732 | 2008-07-27 06:49:38 +0900 | [diff] [blame] | 120 | } // namespace switches |