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 // Delays execution of base::TaskPriority::BACKGROUND tasks until shutdown. 11 const char kDisableBackgroundTasks[] = "disable-background-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 // Indicates that crash reporting should be enabled. On platforms where helper 20 // processes cannot access to files needed to make this decision, this flag is 21 // generated internally. 22 const char kEnableCrashReporter[] = "enable-crash-reporter"; 23 24 // Comma-separated list of feature names to enable. See also kDisableFeatures. 25 const char kEnableFeatures[] = "enable-features"; 26 27 // Generates full memory crash dump. 28 const char kFullMemoryCrashReport[] = "full-memory-crash-report"; 29 30 // Force low-end device mode when set. 31 const char kEnableLowEndDeviceMode[] = "enable-low-end-device-mode"; 32 33 // Force disabling of low-end device mode when set. 34 const char kDisableLowEndDeviceMode[] = "disable-low-end-device-mode"; 35 36 // This option can be used to force field trials when testing changes locally. 37 // The argument is a list of name and value pairs, separated by slashes. If a 38 // trial name is prefixed with an asterisk, that trial will start activated. 39 // For example, the following argument defines two trials, with the second one 40 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/" This option can 41 // also be used by the browser process to send the list of trials to a 42 // non-browser process, using the same format. See 43 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details. 44 const char kForceFieldTrials[] = "force-fieldtrials"; 45 46 // Suppresses all error dialogs when present. 47 const char kNoErrorDialogs[] = "noerrdialogs"; 48 49 // When running certain tests that spawn child processes, this switch indicates 50 // to the test framework that the current process is a child process. 51 const char kTestChildProcess[] = "test-child-process"; 52 53 // When running certain tests that spawn child processes, this switch indicates 54 // to the test framework that the current process should not initialize ICU to 55 // avoid creating any scoped handles too early in startup. 56 const char kTestDoNotInitializeIcu[] = "test-do-not-initialize-icu"; 57 58 // Gives the default maximal active V-logging level; 0 is the default. 59 // Normally positive values are used for V-logging levels. 60 const char kV[] = "v"; 61 62 // Gives the per-module maximal V-logging levels to override the value 63 // given by --v. E.g. "my_module=2,foo*=3" would change the logging 64 // level for all code in source files "my_module.*" and "foo*.*" 65 // ("-inl" suffixes are also disregarded for this matching). 66 // 67 // Any pattern containing a forward or backward slash will be tested 68 // against the whole pathname and not just the module. E.g., 69 // "*/foo/bar/*=2" would change the logging level for all code in 70 // source files under a "foo/bar" directory. 71 const char kVModule[] = "vmodule"; 72 73 // Will wait for 60 seconds for a debugger to come to attach to the process. 74 const char kWaitForDebugger[] = "wait-for-debugger"; 75 76 // Sends trace events from these categories to a file. 77 // --trace-to-file on its own sends to default categories. 78 const char kTraceToFile[] = "trace-to-file"; 79 80 // Specifies the file name for --trace-to-file. If unspecified, it will 81 // go to a default file name. 82 const char kTraceToFileName[] = "trace-to-file-name"; 83 84 // Specifies a location for profiling output. This will only work if chrome has 85 // been built with the gyp variable profiling=1 or gn arg enable_profiling=true. 86 // 87 // {pid} if present will be replaced by the pid of the process. 88 // {count} if present will be incremented each time a profile is generated 89 // for this process. 90 // The default is chrome-profile-{pid} for the browser and test-profile-{pid} 91 // for tests. 92 const char kProfilingFile[] = "profiling-file"; 93 94 #if defined(OS_WIN) 95 // Disables the USB keyboard detection for blocking the OSK on Win8+. 96 const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect"; 97 #endif 98 99 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 100 // The /dev/shm partition is too small in certain VM environments, causing 101 // Chrome to fail or crash (see http://crbug.com/715363). Use this flag to 102 // work-around this issue (a temporary directory will always be used to create 103 // anonymous shared memory files). 104 const char kDisableDevShmUsage[] = "disable-dev-shm-usage"; 105 #endif 106 107 #if defined(OS_POSIX) 108 // Used for turning on Breakpad crash reporting in a debug environment where 109 // crash reporting is typically compiled but disabled. 110 const char kEnableCrashReporterForTesting[] = 111 "enable-crash-reporter-for-testing"; 112 #endif 113 114 #if defined(OS_ANDROID) 115 // Optimizes memory layout of the native library using the orderfile symbols 116 // given in base/android/library_loader/anchor_functions.h, via madvise and 117 // changing the library prefetch behavior. 118 const char kOrderfileMemoryOptimization[] = "orderfile-memory-optimization"; 119 #endif 120 121 } // namespace switches 122