|
1 // Copyright (c) 2006-2009 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 "chrome/common/chrome_switches.h" |
|
6 |
|
7 #include "base/base_switches.h" |
|
8 |
|
9 namespace switches { |
|
10 |
|
11 // Can't find the switch you are looking for? try looking in |
|
12 // base/base_switches.cc instead. |
|
13 |
|
14 // Suppresses hang monitor dialogs in renderer processes. |
|
15 const wchar_t kDisableHangMonitor[] = L"disable-hang-monitor"; |
|
16 |
|
17 // Completely disables UMA metrics system. |
|
18 const wchar_t kDisableMetrics[] = L"disable-metrics"; |
|
19 |
|
20 // Enables the recording of metrics reports but disables reporting. |
|
21 // In contrast to kDisableMetrics, this executes all the code that a normal |
|
22 // client would use for reporting, except the report is dropped rather than sent |
|
23 // to the server. This is useful for finding issues in the metrics code during |
|
24 // UI and performance tests. |
|
25 const wchar_t kMetricsRecordingOnly[] = L"metrics-recording-only"; |
|
26 |
|
27 // Causes the browser process to throw an assertion on startup. |
|
28 const wchar_t kBrowserAssertTest[] = L"assert-test"; |
|
29 |
|
30 // Causes the renderer process to throw an assertion on launch. |
|
31 const wchar_t kRendererAssertTest[] = L"renderer-assert-test"; |
|
32 |
|
33 // Causes the browser process to crash on startup. |
|
34 const wchar_t kBrowserCrashTest[] = L"crash-test"; |
|
35 |
|
36 // Causes the renderer process to crash on launch. |
|
37 const wchar_t kRendererCrashTest[] = L"renderer-crash-test"; |
|
38 |
|
39 // Causes the renderer process to display a dialog on launch. |
|
40 const wchar_t kRendererStartupDialog[] = L"renderer-startup-dialog"; |
|
41 |
|
42 // Causes the plugin process to display a dialog on launch. |
|
43 const wchar_t kPluginStartupDialog[] = L"plugin-startup-dialog"; |
|
44 |
|
45 // Specifies a command that should be used to launch the plugin process. Useful |
|
46 // for running the plugin process through purify or quantify. Ex: |
|
47 // --plugin-launcher="path\to\purify /Run=yes" |
|
48 const wchar_t kPluginLauncher[] = L"plugin-launcher"; |
|
49 |
|
50 // The value of this switch tells the child process which |
|
51 // IPC channel the browser expects to use to communicate with it. |
|
52 const wchar_t kProcessChannelID[] = L"channel"; |
|
53 |
|
54 // The value of this switch tells the app to listen for and broadcast |
|
55 // testing-related messages on IPC channel with the given ID. |
|
56 const wchar_t kTestingChannelID[] = L"testing-channel"; |
|
57 |
|
58 // The value of this switch specifies which page will be displayed |
|
59 // in newly-opened tabs. We need this for testing purposes so |
|
60 // that the UI tests don't depend on what comes up for http://google.com. |
|
61 const wchar_t kHomePage[] = L"homepage"; |
|
62 |
|
63 // Causes the process to run as renderer instead of as browser. |
|
64 const wchar_t kRendererProcess[] = L"renderer"; |
|
65 |
|
66 // Path to the exe to run for the renderer and plugin subprocesses. |
|
67 const wchar_t kBrowserSubprocessPath[] = L"browser-subprocess-path"; |
|
68 |
|
69 // Causes the process to run as a plugin subprocess. |
|
70 const wchar_t kPluginProcess[] = L"plugin"; |
|
71 |
|
72 // Causes the process to run as a worker subprocess. |
|
73 const wchar_t kWorkerProcess[] = L"worker"; |
|
74 |
|
75 // Runs the renderer and plugins in the same process as the browser |
|
76 const wchar_t kSingleProcess[] = L"single-process"; |
|
77 |
|
78 // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own |
|
79 // renderer process. We default to using a renderer process for each |
|
80 // site instance (i.e., group of pages from the same registered domain with |
|
81 // script connections to each other). |
|
82 const wchar_t kProcessPerTab[] = L"process-per-tab"; |
|
83 |
|
84 // Runs a single process for each site (i.e., group of pages from the same |
|
85 // registered domain) the user visits. We default to using a renderer process |
|
86 // for each site instance (i.e., group of pages from the same registered |
|
87 // domain with script connections to each other). |
|
88 const wchar_t kProcessPerSite[] = L"process-per-site"; |
|
89 |
|
90 // Runs plugins inside the renderer process |
|
91 const wchar_t kInProcessPlugins[] = L"in-process-plugins"; |
|
92 |
|
93 // Runs the renderer outside the sandbox. |
|
94 const wchar_t kNoSandbox[] = L"no-sandbox"; |
|
95 |
|
96 // Runs the plugin processes inside the sandbox. |
|
97 const wchar_t kSafePlugins[] = L"safe-plugins"; |
|
98 |
|
99 // Excludes these plugins from the plugin sandbox. |
|
100 // This is a comma-separated list of plugin library names and activex clsid. |
|
101 const wchar_t kTrustedPlugins[] = L"trusted-plugins"; |
|
102 |
|
103 // Runs the security test for the sandbox. |
|
104 const wchar_t kTestSandbox[] = L"test-sandbox"; |
|
105 |
|
106 // Specifies the user data directory, which is where the browser will look |
|
107 // for all of its state. |
|
108 const wchar_t kUserDataDir[] = L"user-data-dir"; |
|
109 |
|
110 // Specifies the plugin data directory, which is where plugins (Gears |
|
111 // specifically) will store its state. |
|
112 const wchar_t kPluginDataDir[] = L"plugin-data-dir"; |
|
113 |
|
114 // Use a specific disk cache location, rather than one derived from the |
|
115 // UserDatadir. |
|
116 const wchar_t kDiskCacheDir[] = L"disk-cache-dir"; |
|
117 |
|
118 // Whether the multiple profiles feature based on the user-data-dir flag is |
|
119 // enabled or not. |
|
120 const wchar_t kEnableUserDataDirProfiles[] = L"enable-udd-profiles"; |
|
121 |
|
122 // Specifies the path to the user data folder for the parent profile. |
|
123 const wchar_t kParentProfile[] = L"parent-profile"; |
|
124 |
|
125 // Specifies that the associated value should be launched in "application" mode. |
|
126 const wchar_t kApp[] = L"app"; |
|
127 |
|
128 // Specifies if the dom_automation_controller_ needs to be bound in the |
|
129 // renderer. This binding happens on per-frame basis and hence can potentially |
|
130 // be a performance bottleneck. One should only enable it when automating |
|
131 // dom based tests. |
|
132 const wchar_t kDomAutomationController[] = L"dom-automation"; |
|
133 |
|
134 // Tells the plugin process the path of the plugin to load |
|
135 const wchar_t kPluginPath[] = L"plugin-path"; |
|
136 |
|
137 // A string used to override the default user agent with a custom one. |
|
138 const wchar_t kUserAgent[] = L"user-agent"; |
|
139 |
|
140 // Specifies the flags passed to JS engine |
|
141 const wchar_t kJavaScriptFlags[] = L"js-flags"; |
|
142 |
|
143 // The Country we should use. This is normally obtained from the operating |
|
144 // system during first run and cached in the preferences afterwards. This is a |
|
145 // string value, the 2 letter code from ISO 3166-1. |
|
146 const wchar_t kCountry[] = L"country"; |
|
147 |
|
148 // The language file that we want to try to open. Of the form |
|
149 // language[-country] where language is the 2 letter code from ISO-639. |
|
150 const wchar_t kLang[] = L"lang"; |
|
151 |
|
152 // Will add kDebugOnStart to every child processes. If a value is passed, it |
|
153 // will be used as a filter to determine if the child process should have the |
|
154 // kDebugOnStart flag passed on or not. |
|
155 const wchar_t kDebugChildren[] = L"debug-children"; |
|
156 |
|
157 // Will add kWaitForDebugger to every child processes. If a value is passed, it |
|
158 // will be used as a filter to determine if the child process should have the |
|
159 // kWaitForDebugger flag passed on or not. |
|
160 const wchar_t kWaitForDebuggerChildren[] = L"wait-for-debugger-children"; |
|
161 |
|
162 // Will filter log messages to show only the messages that are prefixed |
|
163 // with the specified value |
|
164 const wchar_t kLogFilterPrefix[] = L"log-filter-prefix"; |
|
165 |
|
166 // Force logging to be enabled. Logging is disabled by default in release |
|
167 // builds. |
|
168 const wchar_t kEnableLogging[] = L"enable-logging"; |
|
169 |
|
170 // Force logging to be disabled. Logging is enabled by default in debug |
|
171 // builds. |
|
172 const wchar_t kDisableLogging[] = L"disable-logging"; |
|
173 |
|
174 // Sets the minimum log level. Valid values are from 0 to 3: |
|
175 // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3. |
|
176 const wchar_t kLoggingLevel[] = L"log-level"; |
|
177 |
|
178 // Make plugin processes log their sent and received messages to CHROMIUM_LOG(INFO). |
|
179 const wchar_t kLogPluginMessages[] = L"log-plugin-messages"; |
|
180 |
|
181 // Dump any accumualted histograms to the log when browser terminates (requires |
|
182 // logging to be enabled to really do anything). Used by developers and test |
|
183 // scripts. |
|
184 const wchar_t kDumpHistogramsOnExit[] = L"dump-histograms-on-exit"; |
|
185 |
|
186 // enable remote debug / automation shell on the specified port |
|
187 const wchar_t kRemoteShellPort[] = L"remote-shell-port"; |
|
188 |
|
189 // Runs un-installation steps that were done by chrome first-run. |
|
190 const wchar_t kUninstall[] = L"uninstall"; |
|
191 |
|
192 // Number of entries to show in the omnibox popup. |
|
193 const wchar_t kOmniBoxPopupCount[] = L"omnibox-popup-count"; |
|
194 |
|
195 // The value of this switch tells the app to listen for and broadcast |
|
196 // automation-related messages on IPC channel with the given ID. |
|
197 const wchar_t kAutomationClientChannelID[] = L"automation-channel"; |
|
198 |
|
199 // Indicates the last session should be restored on startup. This overrides |
|
200 // the preferences value and is primarily intended for testing. The value of |
|
201 // this switch is the number of tabs to wait until loaded before |
|
202 // 'load completed' is sent to the ui_test. |
|
203 const wchar_t kRestoreLastSession[] = L"restore-last-session"; |
|
204 |
|
205 // Chrome supports a playback and record mode. Record mode saves *everything* |
|
206 // to the cache. Playback mode reads data exclusively from the cache. This |
|
207 // allows us to record a session into the cache and then replay it at will. |
|
208 const wchar_t kRecordMode[] = L"record-mode"; |
|
209 const wchar_t kPlaybackMode[] = L"playback-mode"; |
|
210 |
|
211 // Don't record/playback events when using record & playback. |
|
212 const wchar_t kNoEvents[] = L"no-events"; |
|
213 |
|
214 // Support a separate switch that enables the v8 playback extension. |
|
215 // The extension causes javascript calls to Date.now() and Math.random() |
|
216 // to return consistent values, such that subsequent loads of the same |
|
217 // page will result in consistent js-generated data and XHR requests. |
|
218 // Pages may still be able to generate inconsistent data from plugins. |
|
219 const wchar_t kNoJsRandomness[] = L"no-js-randomness"; |
|
220 |
|
221 // Make Windows happy by allowing it to show "Enable access to this program" |
|
222 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This |
|
223 // only shows an error box because the only way to hide Chrome is by |
|
224 // uninstalling it. |
|
225 const wchar_t kHideIcons[] = L"hide-icons"; |
|
226 |
|
227 const wchar_t kShowIcons[] = L"show-icons"; |
|
228 |
|
229 // Make Chrome default browser |
|
230 const wchar_t kMakeDefaultBrowser[] = L"make-default-browser"; |
|
231 |
|
232 // Use a specified proxy server, overrides system settings. This switch only |
|
233 // affects HTTP and HTTPS requests. |
|
234 const wchar_t kProxyServer[] = L"proxy-server"; |
|
235 |
|
236 // Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is |
|
237 // to use Chromium's network stack to fetch, and V8 to evaluate. |
|
238 const wchar_t kWinHttpProxyResolver[] = L"winhttp-proxy-resolver"; |
|
239 |
|
240 // Chrome will support prefetching of DNS information. Until this becomes |
|
241 // the default, we'll provide a command line switch. |
|
242 extern const wchar_t kDnsLogDetails[] = L"dns-log-details"; |
|
243 extern const wchar_t kDnsPrefetchDisable[] = L"dns-prefetch-disable"; |
|
244 |
|
245 // Enables support to debug printing subsystem. |
|
246 const wchar_t kDebugPrint[] = L"debug-print"; |
|
247 |
|
248 // Allow initialization of all activex controls. This is only to help website |
|
249 // developers test their controls to see if they are compatible in Chrome. |
|
250 // Note there's a duplicate value in activex_shared.cc (to avoid |
|
251 // dependency on chrome module). Please change both locations at the same time. |
|
252 const wchar_t kAllowAllActiveX[] = L"allow-all-activex"; |
|
253 |
|
254 // Browser flag to disable the web inspector for all renderers. |
|
255 const wchar_t kDisableDevTools[] = L"disable-dev-tools"; |
|
256 |
|
257 // Enable web inspector for all windows, even if they're part of the browser. |
|
258 // Allows us to use our dev tools to debug browser windows itself. |
|
259 const wchar_t kAlwaysEnableDevTools[] = L"always-enable-dev-tools"; |
|
260 |
|
261 // Used to set the value of SessionRestore::num_tabs_to_load_. See |
|
262 // session_restore.h for details. |
|
263 const wchar_t kTabCountToLoadOnSessionRestore[] = |
|
264 L"tab-count-to-load-on-session-restore"; |
|
265 |
|
266 // Enable dynamic loading of the Memory Profiler DLL, which will trace |
|
267 // all memory allocations during the run. |
|
268 const wchar_t kMemoryProfiling[] = L"memory-profile"; |
|
269 |
|
270 // Configure Chrome's memory model. |
|
271 // Does chrome really need multiple memory models? No. But we get a lot |
|
272 // of concerns from individuals about how the changes work on *their* |
|
273 // system, and we need to be able to experiment with a few choices. |
|
274 const wchar_t kMemoryModel[] = L"memory-model"; |
|
275 |
|
276 // By default, cookies are not allowed on file://. They are needed in for |
|
277 // testing, for example page cycler and layout tests. See bug 1157243. |
|
278 const wchar_t kEnableFileCookies[] = L"enable-file-cookies"; |
|
279 |
|
280 // Start the browser maximized, regardless of any previous settings. |
|
281 const wchar_t kStartMaximized[] = L"start-maximized"; |
|
282 |
|
283 // Spawn threads to watch for excessive delays in specified message loops. |
|
284 // User should set breakpoints on Alarm() to examine problematic thread. |
|
285 // Usage: -enable-watchdog=[ui][io] |
|
286 // Order of the listed sub-arguments does not matter. |
|
287 const wchar_t kEnableWatchdog[] = L"enable-watchdog"; |
|
288 |
|
289 // Display the First Run experience when the browser is started, regardless of |
|
290 // whether or not it's actually the first run. |
|
291 const wchar_t kFirstRun[] = L"first-run"; |
|
292 |
|
293 // Bypass the First Run experience when the browser is started, regardless of |
|
294 // whether or not it's actually the first run. Overrides kFirstRun in case |
|
295 // you're for some reason tempted to pass them both. |
|
296 const wchar_t kNoFirstRun[] = L"no-first-run"; |
|
297 |
|
298 // Enable histograming of tasks served by MessageLoop. See about:histograms/Loop |
|
299 // for results, which show frequency of messages on each thread, including APC |
|
300 // count, object signalling count, etc. |
|
301 const wchar_t kMessageLoopHistogrammer[] = L"message-loop-histogrammer"; |
|
302 |
|
303 // Perform importing from another browser. The value associated with this |
|
304 // setting encodes the target browser and what items to import. |
|
305 const wchar_t kImport[] = L"import"; |
|
306 |
|
307 // Change the DCHECKS to dump memory and continue instead of displaying error |
|
308 // dialog. This is valid only in Release mode when --enable-dcheck is |
|
309 // specified. |
|
310 const wchar_t kSilentDumpOnDCHECK[] = L"silent-dump-on-dcheck"; |
|
311 |
|
312 // Normally when the user attempts to navigate to a page that was the result of |
|
313 // a post we prompt to make sure they want to. This switch may be used to |
|
314 // disable that check. This switch is used during automated testing. |
|
315 const wchar_t kDisablePromptOnRepost[] = L"disable-prompt-on-repost"; |
|
316 |
|
317 // Disable pop-up blocking. |
|
318 const wchar_t kDisablePopupBlocking[] = L"disable-popup-blocking"; |
|
319 |
|
320 // Don't execute JavaScript (browser JS like the new tab page still runs). |
|
321 const wchar_t kDisableJavaScript[] = L"disable-javascript"; |
|
322 |
|
323 // Don't enforce the same-origin policy. (Used by people testing their sites.) |
|
324 const wchar_t kDisableWebSecurity[] = L"disable-web-security"; |
|
325 |
|
326 // Prevent Java from running. |
|
327 const wchar_t kDisableJava[] = L"disable-java"; |
|
328 |
|
329 // Prevent plugins from running. |
|
330 const wchar_t kDisablePlugins[] = L"disable-plugins"; |
|
331 |
|
332 // Prevent images from loading. |
|
333 const wchar_t kDisableImages[] = L"disable-images"; |
|
334 |
|
335 // Use the low fragmentation heap for the CRT. |
|
336 const wchar_t kUseLowFragHeapCrt[] = L"use-lf-heap"; |
|
337 |
|
338 #ifndef NDEBUG |
|
339 // Debug only switch to specify which gears plugin dll to load. |
|
340 const wchar_t kGearsPluginPathOverride[] = L"gears-plugin-path"; |
|
341 #endif |
|
342 |
|
343 // Enable the fastback page cache. |
|
344 const wchar_t kEnableFastback[] = L"enable-fastback"; |
|
345 |
|
346 // Allow loading of the javascript debugger UI from the filesystem. |
|
347 const wchar_t kJavaScriptDebuggerPath[] = L"javascript-debugger-path"; |
|
348 |
|
349 const wchar_t kDisableP13n[] = L"disable-p13n"; |
|
350 |
|
351 // Enable support for SDCH filtering (dictionary based expansion of content). |
|
352 // Optional argument is *the* only domain name that will have SDCH suppport. |
|
353 // Default is "-enable-sdch" to advertise SDCH on all domains. |
|
354 // Sample usage with argument: "-enable-sdch=.google.com" |
|
355 // SDCH is currently only supported server-side for searches on google.com. |
|
356 const wchar_t kSdchFilter[] = L"enable-sdch"; |
|
357 |
|
358 // Enable user script support. |
|
359 const wchar_t kEnableUserScripts[] = L"enable-user-scripts"; |
|
360 |
|
361 // Enable extensions. |
|
362 const wchar_t kEnableExtensions[] = L"enable-extensions"; |
|
363 |
|
364 // Install the extension specified in the argument. This is for MIME type |
|
365 // handling so that users can double-click on an extension. |
|
366 const wchar_t kInstallExtension[] = L"install-extension"; |
|
367 |
|
368 // Load an extension from the specified directory. |
|
369 const wchar_t kLoadExtension[] = L"load-extension"; |
|
370 |
|
371 // Load an NPAPI plugin from the specified path. |
|
372 const wchar_t kLoadPlugin[] = L"load-plugin"; |
|
373 |
|
374 // directory to locate user scripts in as an over-ride of the default |
|
375 const wchar_t kUserScriptsDir[] = L"user-scripts-dir"; |
|
376 |
|
377 // Causes the browser to launch directly in incognito mode. |
|
378 const wchar_t kIncognito[] = L"incognito"; |
|
379 |
|
380 // Turns on the accessibility in the renderer. Off by default until |
|
381 // http://b/issue?id=1432077 is fixed. |
|
382 const wchar_t kEnableRendererAccessibility[] = L"enable-renderer-accessibility"; |
|
383 |
|
384 // Pass the name of the current running automated test to Chrome. |
|
385 const wchar_t kTestName[] = L"test-name"; |
|
386 |
|
387 // On POSIX only: the contents of this flag are prepended to the renderer |
|
388 // command line. (Useful values might be "valgrind" or "gdb --args") |
|
389 const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix"; |
|
390 |
|
391 // Temparary option for new ftp implemetation. |
|
392 const wchar_t kNewFtp[] = L"new-ftp"; |
|
393 |
|
394 // On POSIX only: use FIFO for IPC channels so that "unrelated" process |
|
395 // can connect to a channel, provided it knows its name. For debugging purposes. |
|
396 const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo"; |
|
397 |
|
398 // If this flag is set open out of process developer tools window instead of |
|
399 // Console Debugger when user clicks "Debug JavaScript". |
|
400 const wchar_t kEnableOutOfProcessDevTools[] = L"enable-oop-devtools"; |
|
401 |
|
402 // Enable HTML5 Worker support |
|
403 const wchar_t kEnableWebWorkers[] = L"enable-web-workers"; |
|
404 |
|
405 // Causes the worker process allocation to use as many processes as cores. |
|
406 const wchar_t kWebWorkerProcessPerCore[] = L"web-worker-process-per-core"; |
|
407 |
|
408 // Causes workers to run together in one process, depending on their domains. |
|
409 // Note this is duplicated in webworkerclient_impl.cc |
|
410 const wchar_t kWebWorkerShareProcesses[] = L"web-worker-share-processes"; |
|
411 |
|
412 // Enables experimental views under gtk. |
|
413 const wchar_t kViewsGtk[] = L"views-gtk"; |
|
414 |
|
415 // Enables the bookmark menu. |
|
416 const wchar_t kBookmarkMenu[] = L"bookmark-menu"; |
|
417 |
|
418 // Enables StatsTable, logging statistics to a global named shared memory table. |
|
419 const wchar_t kEnableStatsTable[] = L"enable-stats-table"; |
|
420 |
|
421 // Enables the Omnibox2 popup and functionality. |
|
422 const wchar_t kEnableOmnibox2[] = L"enable-omnibox2"; |
|
423 |
|
424 // Replaces the audio IPC layer for <audio> and <video> with a mock audio |
|
425 // device, useful when using remote desktop or machines without sound cards. |
|
426 // This is temporary until we fix the underlying problem. |
|
427 // |
|
428 // TODO(scherkus): remove --disable-audio when we have a proper fallback |
|
429 // mechanism. |
|
430 const wchar_t kDisableAudio[] = L"disable-audio"; |
|
431 |
|
432 // Replaces the buffered data source for <audio> and <video> with a simplified |
|
433 // resource loader that downloads the entire resource into memory. |
|
434 // |
|
435 // TODO(scherkus): remove --simple-data-source when our media resource loading |
|
436 // is cleaned up and playback testing completed. |
|
437 const wchar_t kSimpleDataSource[] = L"simple-data-source"; |
|
438 |
|
439 } // namespace switches |