Fix emulator build error
[platform/framework/web/chromium-efl.git] / base / base_switches.cc
1 // Copyright 2012 The Chromium Authors
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 #include "build/chromeos_buildflags.h"
8
9 namespace switches {
10
11 // Delays execution of TaskPriority::BEST_EFFORT tasks until shutdown.
12 const char kDisableBestEffortTasks[] = "disable-best-effort-tasks";
13
14 // Disables the crash reporting.
15 const char kDisableBreakpad[]               = "disable-breakpad";
16
17 // Comma-separated list of feature names to disable. See also kEnableFeatures.
18 const char kDisableFeatures[] = "disable-features";
19
20 // Force disabling of low-end device mode when set.
21 const char kDisableLowEndDeviceMode[] = "disable-low-end-device-mode";
22
23 // Indicates that crash reporting should be enabled. On platforms where helper
24 // processes cannot access to files needed to make this decision, this flag is
25 // generated internally.
26 const char kEnableCrashReporter[]           = "enable-crash-reporter";
27
28 // Comma-separated list of feature names to enable. See also kDisableFeatures.
29 const char kEnableFeatures[] = "enable-features";
30
31 // Force low-end device mode when set.
32 const char kEnableLowEndDeviceMode[]        = "enable-low-end-device-mode";
33
34 // Enable the use of background thread priorities for background tasks in the
35 // ThreadPool even on systems where it is disabled by default, e.g. due to
36 // concerns about priority inversions.
37 const char kEnableBackgroundThreadPool[] = "enable-background-thread-pool";
38
39 // Handle to the shared memory segment containing field trial state that is to
40 // be shared between processes. The argument to this switch is made of 4
41 // segments, separated by commas:
42 // 1. The platform-specific handle id for the shared memory as a string.
43 // 2. The high 64 bits of the shared memory block GUID.
44 // 3. The low 64 bits of the shared memory block GUID.
45 // 4. The size of the shared memory segment as a string.
46 const char kFieldTrialHandle[] = "field-trial-handle";
47
48 // This option can be used to force field trials when testing changes locally.
49 // The argument is a list of name and value pairs, separated by slashes. If a
50 // trial name is prefixed with an asterisk, that trial will start activated.
51 // For example, the following argument defines two trials, with the second one
52 // activated: "GoogleNow/Enable/*MaterialDesignNTP/Default/" This option can
53 // also be used by the browser process to send the list of trials to a
54 // non-browser process, using the same format. See
55 // FieldTrialList::CreateTrialsFromString() in field_trial.h for details.
56 const char kForceFieldTrials[]              = "force-fieldtrials";
57
58 // Generates full memory crash dump.
59 const char kFullMemoryCrashReport[] = "full-memory-crash-report";
60
61 // Logs information about all tasks posted with TaskPriority::BEST_EFFORT. Use
62 // this to diagnose issues that are thought to be caused by
63 // TaskPriority::BEST_EFFORT execution fences. Note: Tasks posted to a
64 // non-BEST_EFFORT UpdateableSequencedTaskRunner whose priority is later lowered
65 // to BEST_EFFORT are not logged.
66 const char kLogBestEffortTasks[] = "log-best-effort-tasks";
67
68 // Suppresses all error dialogs when present.
69 const char kNoErrorDialogs[]                = "noerrdialogs";
70
71 // Starts the sampling based profiler for the browser process at startup. This
72 // will only work if chrome has been built with the gn arg enable_profiling =
73 // true. The output will go to the value of kProfilingFile.
74 const char kProfilingAtStart[] = "profiling-at-start";
75
76 // Specifies a location for profiling output. This will only work if chrome has
77 // been built with the gyp variable profiling=1 or gn arg enable_profiling=true.
78 //
79 //   {pid} if present will be replaced by the pid of the process.
80 //   {count} if present will be incremented each time a profile is generated
81 //           for this process.
82 // The default is chrome-profile-{pid} for the browser and test-profile-{pid}
83 // for tests.
84 const char kProfilingFile[] = "profiling-file";
85
86 // Controls whether profile data is periodically flushed to a file. Normally
87 // the data gets written on exit but cases exist where chromium doesn't exit
88 // cleanly (especially when using single-process). A time in seconds can be
89 // specified.
90 const char kProfilingFlush[] = "profiling-flush";
91
92 // When running certain tests that spawn child processes, this switch indicates
93 // to the test framework that the current process is a child process.
94 const char kTestChildProcess[] = "test-child-process";
95
96 // Sends trace events from these categories to a file.
97 // --trace-to-file on its own sends to default categories.
98 const char kTraceToFile[] = "trace-to-file";
99
100 // Specifies the file name for --trace-to-file. If unspecified, it will
101 // go to a default file name.
102 const char kTraceToFileName[] = "trace-to-file-name";
103
104 // Gives the default maximal active V-logging level; 0 is the default.
105 // Normally positive values are used for V-logging levels.
106 const char kV[] = "v";
107
108 // Gives the per-module maximal V-logging levels to override the value
109 // given by --v.  E.g. "my_module=2,foo*=3" would change the logging
110 // level for all code in source files "my_module.*" and "foo*.*"
111 // ("-inl" suffixes are also disregarded for this matching).
112 //
113 // Any pattern containing a forward or backward slash will be tested
114 // against the whole pathname and not just the module.  E.g.,
115 // "*/foo/bar/*=2" would change the logging level for all code in
116 // source files under a "foo/bar" directory.
117 const char kVModule[] = "vmodule";
118
119 // Will wait for 60 seconds for a debugger to come to attach to the process.
120 const char kWaitForDebugger[] = "wait-for-debugger";
121
122 #if BUILDFLAG(IS_WIN)
123 // Disable high-resolution timer on Windows.
124 const char kDisableHighResTimer[] = "disable-highres-timer";
125
126 // Disables the USB keyboard detection for blocking the OSK on Windows.
127 const char kDisableUsbKeyboardDetect[]      = "disable-usb-keyboard-detect";
128 #endif
129
130 #if BUILDFLAG(IS_LINUX)
131 // The /dev/shm partition is too small in certain VM environments, causing
132 // Chrome to fail or crash (see http://crbug.com/715363). Use this flag to
133 // work-around this issue (a temporary directory will always be used to create
134 // anonymous shared memory files).
135 const char kDisableDevShmUsage[] = "disable-dev-shm-usage";
136 #endif
137
138 #if BUILDFLAG(IS_EFL)
139 // Used for limiting memory allocations in MessagePumpForUIEfl.
140 const char kLimitMemoryAllocationInScheduleDelayedWork[] =
141     "limit-memory-allocation-in-schedule-delayed-work";
142 const char kEnableOffscreenRendering[] = "enable-offscreen-rendering";
143 #endif
144
145 #if BUILDFLAG(IS_TIZEN)
146 const char kDiscardableMemoryLimit[] = "discardable-memory-limit";
147 const char kDiscardableMemoryPurgeDelay[] = "discardable-memory-purge-delay";
148 #endif
149
150 #if BUILDFLAG(IS_POSIX)
151 // Used for turning on Breakpad crash reporting in a debug environment where
152 // crash reporting is typically compiled but disabled.
153 const char kEnableCrashReporterForTesting[] =
154     "enable-crash-reporter-for-testing";
155 #endif
156
157 #if BUILDFLAG(IS_ANDROID)
158 // Enables the reached code profiler that samples all threads in all processes
159 // to determine which functions are almost never executed.
160 const char kEnableReachedCodeProfiler[] = "enable-reached-code-profiler";
161
162 // Specifies the profiling interval in microseconds for reached code profiler.
163 const char kReachedCodeSamplingIntervalUs[] =
164     "reached-code-sampling-interval-us";
165
166 // Default country code to be used for search engine localization.
167 const char kDefaultCountryCodeAtInstall[] = "default-country-code";
168
169 // Adds additional thread idle time information into the trace event output.
170 const char kEnableIdleTracing[] = "enable-idle-tracing";
171
172 // The field trial parameters and their values when testing changes locally.
173 const char kForceFieldTrialParams[] = "force-fieldtrial-params";
174
175 // When we retrieve the package name within the SDK Runtime, we need to use
176 // a bit of a hack to do this by taking advantage of the fact that the pid
177 // is the same pid as the application's pid + 10000.
178 // see:
179 // https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/os/Process.java;l=292;drc=47fffdd53115a9af1820e3f89d8108745be4b55d
180 // When the render process is created however, it is just a regular isolated
181 // process with no particular association so we can't perform the same hack.
182 // When creating minidumps, the package name is retrieved from the process
183 // meaning the render process minidumps would end up reporting a generic
184 // process name not associated with the app.
185 // We work around this by feeding through the host package information to the
186 // render process when launching it.
187 const char kHostPackageName[] = "host-package-name";
188 const char kHostPackageLabel[] = "host-package-label";
189 const char kHostVersionCode[] = "host-version-code";
190 const char kPackageName[] = "package-name";
191 const char kPackageVersionName[] = "package-version-name";
192 const char kPackageVersionCode[] = "package-version-code";
193 #endif
194
195 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
196 // TODO(crbug.com/1176772): Remove kEnableCrashpad and IsCrashpadEnabled() when
197 // Crashpad is fully enabled on Linux. Indicates that Crashpad should be
198 // enabled.
199 extern const char kEnableCrashpad[] = "enable-crashpad";
200 #endif
201
202 #if BUILDFLAG(IS_CHROMEOS)
203 // Override the default scheduling boosting value for urgent tasks.
204 // This can be adjusted if a specific chromeos device shows better perf/power
205 // ratio (e.g. by running video conference tests).
206 // Currently, this values directs to linux scheduler's utilization min clamp.
207 // Range is 0(no biased load) ~ 100(mamximum load value).
208 const char kSchedulerBoostUrgent[] = "scheduler-boost-urgent";
209 #endif
210
211 }  // namespace switches