| 6 | #include "build/build_config.h" |
| 7 |
| 8 | namespace switches { |
| 9 |
| 10 | // Delays execution of TaskPriority::BEST_EFFORT tasks until shutdown. |
| 11 | const char kDisableBestEffortTasks[] = "disable-best-effort-tasks"; |
| 12 |
| 13 | // Disables the crash reporting. |
| 14 | const char kDisableBreakpad[] = "disable-breakpad"; |
| 15 |
| 16 | // Comma-separated list of feature names to disable. See also kEnableFeatures. |
| 17 | const char kDisableFeatures[] = "disable-features"; |
| 18 |
| 19 | // Force disabling of low-end device mode when set. |
| 20 | const char kDisableLowEndDeviceMode[] = "disable-low-end-device-mode"; |
| 21 |
| 22 | // Indicates that crash reporting should be enabled. On platforms where helper |
| 23 | // processes cannot access to files needed to make this decision, this flag is |
| 24 | // generated internally. |
| 25 | const char kEnableCrashReporter[] = "enable-crash-reporter"; |
| 26 |
| 27 | // Comma-separated list of feature names to enable. See also kDisableFeatures. |
| 28 | const char kEnableFeatures[] = "enable-features"; |
| 29 |
| 30 | // Force low-end device mode when set. |
| 31 | const char kEnableLowEndDeviceMode[] = "enable-low-end-device-mode"; |
| 32 |
| 33 | // This option can be used to force field trials when testing changes locally. |
| 34 | // The argument is a list of name and value pairs, separated by slashes. If a |
| 35 | // trial name is prefixed with an asterisk, that trial will start activated. |
| 36 | // For example, the following argument defines two trials, with the second one |
| 37 | // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/" This option can |
| 38 | // also be used by the browser process to send the list of trials to a |
| 39 | // non-browser process, using the same format. See |
| 40 | // FieldTrialList::CreateTrialsFromString() in field_trial.h for details. |
| 41 | const char kForceFieldTrials[] = "force-fieldtrials"; |
| 42 |
| 43 | // Generates full memory crash dump. |
| 44 | const char kFullMemoryCrashReport[] = "full-memory-crash-report"; |
| 45 |
| 46 | // Logs information about all tasks posted with TaskPriority::BEST_EFFORT. Use |
| 47 | // this to diagnose issues that are thought to be caused by |
| 48 | // TaskPriority::BEST_EFFORT execution fences. Note: Tasks posted to a |
| 49 | // non-BEST_EFFORT UpdateableSequencedTaskRunner whose priority is later lowered |
| 50 | // to BEST_EFFORT are not logged. |
| 51 | const char kLogBestEffortTasks[] = "log-best-effort-tasks"; |
| 52 |
| 53 | // Suppresses all error dialogs when present. |
| 54 | const char kNoErrorDialogs[] = "noerrdialogs"; |
| 55 |
| 56 | // Starts the sampling based profiler for the browser process at startup. This |
| 57 | // will only work if chrome has been built with the gn arg enable_profiling = |
| 58 | // true. The output will go to the value of kProfilingFile. |
| 59 | const char kProfilingAtStart[] = "profiling-at-start"; |
| 60 |
| 61 | // Specifies a location for profiling output. This will only work if chrome has |
| 62 | // been built with the gyp variable profiling=1 or gn arg enable_profiling=true. |
| 63 | // |
| 64 | // {pid} if present will be replaced by the pid of the process. |
| 65 | // {count} if present will be incremented each time a profile is generated |
| 66 | // for this process. |
| 67 | // The default is chrome-profile-{pid} for the browser and test-profile-{pid} |
| 68 | // for tests. |
| 69 | const char kProfilingFile[] = "profiling-file"; |
| 70 |
| 71 | // Controls whether profile data is periodically flushed to a file. Normally |
| 72 | // the data gets written on exit but cases exist where chromium doesn't exit |
| 73 | // cleanly (especially when using single-process). A time in seconds can be |
| 74 | // specified. |
| 75 | const char kProfilingFlush[] = "profiling-flush"; |
| 76 |
| 77 | // When running certain tests that spawn child processes, this switch indicates |
| 78 | // to the test framework that the current process is a child process. |
| 79 | const char kTestChildProcess[] = "test-child-process"; |
| 80 |
| 81 | // When running certain tests that spawn child processes, this switch indicates |
| 82 | // to the test framework that the current process should not initialize ICU to |
| 83 | // avoid creating any scoped handles too early in startup. |
| 84 | const char kTestDoNotInitializeIcu[] = "test-do-not-initialize-icu"; |
| 85 |
| 86 | // Sends trace events from these categories to a file. |
| 87 | // --trace-to-file on its own sends to default categories. |
| 88 | const char kTraceToFile[] = "trace-to-file"; |
| 89 |
| 90 | // Specifies the file name for --trace-to-file. If unspecified, it will |
| 91 | // go to a default file name. |
| 92 | const char kTraceToFileName[] = "trace-to-file-name"; |
| 93 |
| 94 | // Gives the default maximal active V-logging level; 0 is the default. |
| 95 | // Normally positive values are used for V-logging levels. |
| 96 | const char kV[] = "v"; |
| 97 |
| 98 | // Gives the per-module maximal V-logging levels to override the value |
| 99 | // given by --v. E.g. "my_module=2,foo*=3" would change the logging |
| 100 | // level for all code in source files "my_module.*" and "foo*.*" |
| 101 | // ("-inl" suffixes are also disregarded for this matching). |
| 102 | // |
| 103 | // Any pattern containing a forward or backward slash will be tested |
| 104 | // against the whole pathname and not just the module. E.g., |
| 105 | // "*/foo/bar/*=2" would change the logging level for all code in |
| 106 | // source files under a "foo/bar" directory. |
| 107 | const char kVModule[] = "vmodule"; |
| 108 |
| 109 | // Will wait for 60 seconds for a debugger to come to attach to the process. |
| 110 | const char kWaitForDebugger[] = "wait-for-debugger"; |
| 111 |
| 112 | #if defined(OS_WIN) |
| 113 | // Disable high-resolution timer on Windows. |
| 114 | const char kDisableHighResTimer[] = "disable-highres-timer"; |
| 115 |
| 116 | // Disables the USB keyboard detection for blocking the OSK on Win8+. |
| 117 | const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect"; |
| 118 | #endif |
| 119 |
| 120 | #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 121 | // The /dev/shm partition is too small in certain VM environments, causing |
| 122 | // Chrome to fail or crash (see http://crbug.com/715363). Use this flag to |
| 123 | // work-around this issue (a temporary directory will always be used to create |
| 124 | // anonymous shared memory files). |
| 125 | const char kDisableDevShmUsage[] = "disable-dev-shm-usage"; |
| 126 | #endif |
| 127 |
| 128 | #if defined(OS_POSIX) |
| 129 | // Used for turning on Breakpad crash reporting in a debug environment where |
| 130 | // crash reporting is typically compiled but disabled. |
| 131 | const char kEnableCrashReporterForTesting[] = |
| 132 | "enable-crash-reporter-for-testing"; |
| 133 | #endif |
| 134 |
| 135 | #if defined(OS_ANDROID) |
| 136 | // Enables the reached code profiler that samples all threads in all processes |
| 137 | // to determine which functions are almost never executed. |
| 138 | const char kEnableReachedCodeProfiler[] = "enable-reached-code-profiler"; |
| 139 | #endif |
| 140 |
| 141 | #if defined(OS_LINUX) |
| 142 | // Controls whether or not retired instruction counts are surfaced for threads |
| 143 | // in trace events on Linux. |
| 144 | // |
| 145 | // This flag requires the BPF sandbox to be disabled. |
| 146 | const char kEnableThreadInstructionCount[] = "enable-thread-instruction-count"; |
| 147 | #endif |
| 148 |
| 149 | } // namespace switches |
| 150 |