michael@0: // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: michael@0: #include "chrome/common/chrome_switches.h" michael@0: michael@0: #include "base/base_switches.h" michael@0: michael@0: namespace switches { michael@0: michael@0: // Can't find the switch you are looking for? try looking in michael@0: // base/base_switches.cc instead. michael@0: michael@0: // Suppresses hang monitor dialogs in renderer processes. michael@0: const wchar_t kDisableHangMonitor[] = L"disable-hang-monitor"; michael@0: michael@0: // Completely disables UMA metrics system. michael@0: const wchar_t kDisableMetrics[] = L"disable-metrics"; michael@0: michael@0: // Enables the recording of metrics reports but disables reporting. michael@0: // In contrast to kDisableMetrics, this executes all the code that a normal michael@0: // client would use for reporting, except the report is dropped rather than sent michael@0: // to the server. This is useful for finding issues in the metrics code during michael@0: // UI and performance tests. michael@0: const wchar_t kMetricsRecordingOnly[] = L"metrics-recording-only"; michael@0: michael@0: // Causes the browser process to throw an assertion on startup. michael@0: const wchar_t kBrowserAssertTest[] = L"assert-test"; michael@0: michael@0: // Causes the renderer process to throw an assertion on launch. michael@0: const wchar_t kRendererAssertTest[] = L"renderer-assert-test"; michael@0: michael@0: // Causes the browser process to crash on startup. michael@0: const wchar_t kBrowserCrashTest[] = L"crash-test"; michael@0: michael@0: // Causes the renderer process to crash on launch. michael@0: const wchar_t kRendererCrashTest[] = L"renderer-crash-test"; michael@0: michael@0: // Causes the renderer process to display a dialog on launch. michael@0: const wchar_t kRendererStartupDialog[] = L"renderer-startup-dialog"; michael@0: michael@0: // Causes the plugin process to display a dialog on launch. michael@0: const wchar_t kPluginStartupDialog[] = L"plugin-startup-dialog"; michael@0: michael@0: // Specifies a command that should be used to launch the plugin process. Useful michael@0: // for running the plugin process through purify or quantify. Ex: michael@0: // --plugin-launcher="path\to\purify /Run=yes" michael@0: const wchar_t kPluginLauncher[] = L"plugin-launcher"; michael@0: michael@0: // The value of this switch tells the child process which michael@0: // IPC channel the browser expects to use to communicate with it. michael@0: const wchar_t kProcessChannelID[] = L"channel"; michael@0: michael@0: // The value of this switch tells the app to listen for and broadcast michael@0: // testing-related messages on IPC channel with the given ID. michael@0: const wchar_t kTestingChannelID[] = L"testing-channel"; michael@0: michael@0: // The value of this switch specifies which page will be displayed michael@0: // in newly-opened tabs. We need this for testing purposes so michael@0: // that the UI tests don't depend on what comes up for http://google.com. michael@0: const wchar_t kHomePage[] = L"homepage"; michael@0: michael@0: // Causes the process to run as renderer instead of as browser. michael@0: const wchar_t kRendererProcess[] = L"renderer"; michael@0: michael@0: // Path to the exe to run for the renderer and plugin subprocesses. michael@0: const wchar_t kBrowserSubprocessPath[] = L"browser-subprocess-path"; michael@0: michael@0: // Causes the process to run as a plugin subprocess. michael@0: const wchar_t kPluginProcess[] = L"plugin"; michael@0: michael@0: // Causes the process to run as a worker subprocess. michael@0: const wchar_t kWorkerProcess[] = L"worker"; michael@0: michael@0: // Runs the renderer and plugins in the same process as the browser michael@0: const wchar_t kSingleProcess[] = L"single-process"; michael@0: michael@0: // Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own michael@0: // renderer process. We default to using a renderer process for each michael@0: // site instance (i.e., group of pages from the same registered domain with michael@0: // script connections to each other). michael@0: const wchar_t kProcessPerTab[] = L"process-per-tab"; michael@0: michael@0: // Runs a single process for each site (i.e., group of pages from the same michael@0: // registered domain) the user visits. We default to using a renderer process michael@0: // for each site instance (i.e., group of pages from the same registered michael@0: // domain with script connections to each other). michael@0: const wchar_t kProcessPerSite[] = L"process-per-site"; michael@0: michael@0: // Runs plugins inside the renderer process michael@0: const wchar_t kInProcessPlugins[] = L"in-process-plugins"; michael@0: michael@0: // Runs the renderer outside the sandbox. michael@0: const wchar_t kNoSandbox[] = L"no-sandbox"; michael@0: michael@0: // Runs the plugin processes inside the sandbox. michael@0: const wchar_t kSafePlugins[] = L"safe-plugins"; michael@0: michael@0: // Excludes these plugins from the plugin sandbox. michael@0: // This is a comma-separated list of plugin library names and activex clsid. michael@0: const wchar_t kTrustedPlugins[] = L"trusted-plugins"; michael@0: michael@0: // Runs the security test for the sandbox. michael@0: const wchar_t kTestSandbox[] = L"test-sandbox"; michael@0: michael@0: // Specifies the user data directory, which is where the browser will look michael@0: // for all of its state. michael@0: const wchar_t kUserDataDir[] = L"user-data-dir"; michael@0: michael@0: // Specifies the plugin data directory, which is where plugins (Gears michael@0: // specifically) will store its state. michael@0: const wchar_t kPluginDataDir[] = L"plugin-data-dir"; michael@0: michael@0: // Use a specific disk cache location, rather than one derived from the michael@0: // UserDatadir. michael@0: const wchar_t kDiskCacheDir[] = L"disk-cache-dir"; michael@0: michael@0: // Whether the multiple profiles feature based on the user-data-dir flag is michael@0: // enabled or not. michael@0: const wchar_t kEnableUserDataDirProfiles[] = L"enable-udd-profiles"; michael@0: michael@0: // Specifies the path to the user data folder for the parent profile. michael@0: const wchar_t kParentProfile[] = L"parent-profile"; michael@0: michael@0: // Specifies that the associated value should be launched in "application" mode. michael@0: const wchar_t kApp[] = L"app"; michael@0: michael@0: // Specifies if the dom_automation_controller_ needs to be bound in the michael@0: // renderer. This binding happens on per-frame basis and hence can potentially michael@0: // be a performance bottleneck. One should only enable it when automating michael@0: // dom based tests. michael@0: const wchar_t kDomAutomationController[] = L"dom-automation"; michael@0: michael@0: // Tells the plugin process the path of the plugin to load michael@0: const wchar_t kPluginPath[] = L"plugin-path"; michael@0: michael@0: // A string used to override the default user agent with a custom one. michael@0: const wchar_t kUserAgent[] = L"user-agent"; michael@0: michael@0: // Specifies the flags passed to JS engine michael@0: const wchar_t kJavaScriptFlags[] = L"js-flags"; michael@0: michael@0: // The Country we should use. This is normally obtained from the operating michael@0: // system during first run and cached in the preferences afterwards. This is a michael@0: // string value, the 2 letter code from ISO 3166-1. michael@0: const wchar_t kCountry[] = L"country"; michael@0: michael@0: // The language file that we want to try to open. Of the form michael@0: // language[-country] where language is the 2 letter code from ISO-639. michael@0: const wchar_t kLang[] = L"lang"; michael@0: michael@0: // Will add kDebugOnStart to every child processes. If a value is passed, it michael@0: // will be used as a filter to determine if the child process should have the michael@0: // kDebugOnStart flag passed on or not. michael@0: const wchar_t kDebugChildren[] = L"debug-children"; michael@0: michael@0: // Will add kWaitForDebugger to every child processes. If a value is passed, it michael@0: // will be used as a filter to determine if the child process should have the michael@0: // kWaitForDebugger flag passed on or not. michael@0: const wchar_t kWaitForDebuggerChildren[] = L"wait-for-debugger-children"; michael@0: michael@0: // Will filter log messages to show only the messages that are prefixed michael@0: // with the specified value michael@0: const wchar_t kLogFilterPrefix[] = L"log-filter-prefix"; michael@0: michael@0: // Force logging to be enabled. Logging is disabled by default in release michael@0: // builds. michael@0: const wchar_t kEnableLogging[] = L"enable-logging"; michael@0: michael@0: // Force logging to be disabled. Logging is enabled by default in debug michael@0: // builds. michael@0: const wchar_t kDisableLogging[] = L"disable-logging"; michael@0: michael@0: // Sets the minimum log level. Valid values are from 0 to 3: michael@0: // INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3. michael@0: const wchar_t kLoggingLevel[] = L"log-level"; michael@0: michael@0: // Make plugin processes log their sent and received messages to CHROMIUM_LOG(INFO). michael@0: const wchar_t kLogPluginMessages[] = L"log-plugin-messages"; michael@0: michael@0: // Dump any accumualted histograms to the log when browser terminates (requires michael@0: // logging to be enabled to really do anything). Used by developers and test michael@0: // scripts. michael@0: const wchar_t kDumpHistogramsOnExit[] = L"dump-histograms-on-exit"; michael@0: michael@0: // enable remote debug / automation shell on the specified port michael@0: const wchar_t kRemoteShellPort[] = L"remote-shell-port"; michael@0: michael@0: // Runs un-installation steps that were done by chrome first-run. michael@0: const wchar_t kUninstall[] = L"uninstall"; michael@0: michael@0: // Number of entries to show in the omnibox popup. michael@0: const wchar_t kOmniBoxPopupCount[] = L"omnibox-popup-count"; michael@0: michael@0: // The value of this switch tells the app to listen for and broadcast michael@0: // automation-related messages on IPC channel with the given ID. michael@0: const wchar_t kAutomationClientChannelID[] = L"automation-channel"; michael@0: michael@0: // Indicates the last session should be restored on startup. This overrides michael@0: // the preferences value and is primarily intended for testing. The value of michael@0: // this switch is the number of tabs to wait until loaded before michael@0: // 'load completed' is sent to the ui_test. michael@0: const wchar_t kRestoreLastSession[] = L"restore-last-session"; michael@0: michael@0: // Chrome supports a playback and record mode. Record mode saves *everything* michael@0: // to the cache. Playback mode reads data exclusively from the cache. This michael@0: // allows us to record a session into the cache and then replay it at will. michael@0: const wchar_t kRecordMode[] = L"record-mode"; michael@0: const wchar_t kPlaybackMode[] = L"playback-mode"; michael@0: michael@0: // Don't record/playback events when using record & playback. michael@0: const wchar_t kNoEvents[] = L"no-events"; michael@0: michael@0: // Support a separate switch that enables the v8 playback extension. michael@0: // The extension causes javascript calls to Date.now() and Math.random() michael@0: // to return consistent values, such that subsequent loads of the same michael@0: // page will result in consistent js-generated data and XHR requests. michael@0: // Pages may still be able to generate inconsistent data from plugins. michael@0: const wchar_t kNoJsRandomness[] = L"no-js-randomness"; michael@0: michael@0: // Make Windows happy by allowing it to show "Enable access to this program" michael@0: // checkbox in Add/Remove Programs->Set Program Access and Defaults. This michael@0: // only shows an error box because the only way to hide Chrome is by michael@0: // uninstalling it. michael@0: const wchar_t kHideIcons[] = L"hide-icons"; michael@0: michael@0: const wchar_t kShowIcons[] = L"show-icons"; michael@0: michael@0: // Make Chrome default browser michael@0: const wchar_t kMakeDefaultBrowser[] = L"make-default-browser"; michael@0: michael@0: // Use a specified proxy server, overrides system settings. This switch only michael@0: // affects HTTP and HTTPS requests. michael@0: const wchar_t kProxyServer[] = L"proxy-server"; michael@0: michael@0: // Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is michael@0: // to use Chromium's network stack to fetch, and V8 to evaluate. michael@0: const wchar_t kWinHttpProxyResolver[] = L"winhttp-proxy-resolver"; michael@0: michael@0: // Chrome will support prefetching of DNS information. Until this becomes michael@0: // the default, we'll provide a command line switch. michael@0: extern const wchar_t kDnsLogDetails[] = L"dns-log-details"; michael@0: extern const wchar_t kDnsPrefetchDisable[] = L"dns-prefetch-disable"; michael@0: michael@0: // Enables support to debug printing subsystem. michael@0: const wchar_t kDebugPrint[] = L"debug-print"; michael@0: michael@0: // Allow initialization of all activex controls. This is only to help website michael@0: // developers test their controls to see if they are compatible in Chrome. michael@0: // Note there's a duplicate value in activex_shared.cc (to avoid michael@0: // dependency on chrome module). Please change both locations at the same time. michael@0: const wchar_t kAllowAllActiveX[] = L"allow-all-activex"; michael@0: michael@0: // Browser flag to disable the web inspector for all renderers. michael@0: const wchar_t kDisableDevTools[] = L"disable-dev-tools"; michael@0: michael@0: // Enable web inspector for all windows, even if they're part of the browser. michael@0: // Allows us to use our dev tools to debug browser windows itself. michael@0: const wchar_t kAlwaysEnableDevTools[] = L"always-enable-dev-tools"; michael@0: michael@0: // Used to set the value of SessionRestore::num_tabs_to_load_. See michael@0: // session_restore.h for details. michael@0: const wchar_t kTabCountToLoadOnSessionRestore[] = michael@0: L"tab-count-to-load-on-session-restore"; michael@0: michael@0: // Enable dynamic loading of the Memory Profiler DLL, which will trace michael@0: // all memory allocations during the run. michael@0: const wchar_t kMemoryProfiling[] = L"memory-profile"; michael@0: michael@0: // Configure Chrome's memory model. michael@0: // Does chrome really need multiple memory models? No. But we get a lot michael@0: // of concerns from individuals about how the changes work on *their* michael@0: // system, and we need to be able to experiment with a few choices. michael@0: const wchar_t kMemoryModel[] = L"memory-model"; michael@0: michael@0: // By default, cookies are not allowed on file://. They are needed in for michael@0: // testing, for example page cycler and layout tests. See bug 1157243. michael@0: const wchar_t kEnableFileCookies[] = L"enable-file-cookies"; michael@0: michael@0: // Start the browser maximized, regardless of any previous settings. michael@0: const wchar_t kStartMaximized[] = L"start-maximized"; michael@0: michael@0: // Spawn threads to watch for excessive delays in specified message loops. michael@0: // User should set breakpoints on Alarm() to examine problematic thread. michael@0: // Usage: -enable-watchdog=[ui][io] michael@0: // Order of the listed sub-arguments does not matter. michael@0: const wchar_t kEnableWatchdog[] = L"enable-watchdog"; michael@0: michael@0: // Display the First Run experience when the browser is started, regardless of michael@0: // whether or not it's actually the first run. michael@0: const wchar_t kFirstRun[] = L"first-run"; michael@0: michael@0: // Bypass the First Run experience when the browser is started, regardless of michael@0: // whether or not it's actually the first run. Overrides kFirstRun in case michael@0: // you're for some reason tempted to pass them both. michael@0: const wchar_t kNoFirstRun[] = L"no-first-run"; michael@0: michael@0: // Enable histograming of tasks served by MessageLoop. See about:histograms/Loop michael@0: // for results, which show frequency of messages on each thread, including APC michael@0: // count, object signalling count, etc. michael@0: const wchar_t kMessageLoopHistogrammer[] = L"message-loop-histogrammer"; michael@0: michael@0: // Perform importing from another browser. The value associated with this michael@0: // setting encodes the target browser and what items to import. michael@0: const wchar_t kImport[] = L"import"; michael@0: michael@0: // Change the DCHECKS to dump memory and continue instead of displaying error michael@0: // dialog. This is valid only in Release mode when --enable-dcheck is michael@0: // specified. michael@0: const wchar_t kSilentDumpOnDCHECK[] = L"silent-dump-on-dcheck"; michael@0: michael@0: // Normally when the user attempts to navigate to a page that was the result of michael@0: // a post we prompt to make sure they want to. This switch may be used to michael@0: // disable that check. This switch is used during automated testing. michael@0: const wchar_t kDisablePromptOnRepost[] = L"disable-prompt-on-repost"; michael@0: michael@0: // Disable pop-up blocking. michael@0: const wchar_t kDisablePopupBlocking[] = L"disable-popup-blocking"; michael@0: michael@0: // Don't execute JavaScript (browser JS like the new tab page still runs). michael@0: const wchar_t kDisableJavaScript[] = L"disable-javascript"; michael@0: michael@0: // Don't enforce the same-origin policy. (Used by people testing their sites.) michael@0: const wchar_t kDisableWebSecurity[] = L"disable-web-security"; michael@0: michael@0: // Prevent Java from running. michael@0: const wchar_t kDisableJava[] = L"disable-java"; michael@0: michael@0: // Prevent plugins from running. michael@0: const wchar_t kDisablePlugins[] = L"disable-plugins"; michael@0: michael@0: // Prevent images from loading. michael@0: const wchar_t kDisableImages[] = L"disable-images"; michael@0: michael@0: // Use the low fragmentation heap for the CRT. michael@0: const wchar_t kUseLowFragHeapCrt[] = L"use-lf-heap"; michael@0: michael@0: #ifndef NDEBUG michael@0: // Debug only switch to specify which gears plugin dll to load. michael@0: const wchar_t kGearsPluginPathOverride[] = L"gears-plugin-path"; michael@0: #endif michael@0: michael@0: // Enable the fastback page cache. michael@0: const wchar_t kEnableFastback[] = L"enable-fastback"; michael@0: michael@0: // Allow loading of the javascript debugger UI from the filesystem. michael@0: const wchar_t kJavaScriptDebuggerPath[] = L"javascript-debugger-path"; michael@0: michael@0: const wchar_t kDisableP13n[] = L"disable-p13n"; michael@0: michael@0: // Enable support for SDCH filtering (dictionary based expansion of content). michael@0: // Optional argument is *the* only domain name that will have SDCH suppport. michael@0: // Default is "-enable-sdch" to advertise SDCH on all domains. michael@0: // Sample usage with argument: "-enable-sdch=.google.com" michael@0: // SDCH is currently only supported server-side for searches on google.com. michael@0: const wchar_t kSdchFilter[] = L"enable-sdch"; michael@0: michael@0: // Enable user script support. michael@0: const wchar_t kEnableUserScripts[] = L"enable-user-scripts"; michael@0: michael@0: // Enable extensions. michael@0: const wchar_t kEnableExtensions[] = L"enable-extensions"; michael@0: michael@0: // Install the extension specified in the argument. This is for MIME type michael@0: // handling so that users can double-click on an extension. michael@0: const wchar_t kInstallExtension[] = L"install-extension"; michael@0: michael@0: // Load an extension from the specified directory. michael@0: const wchar_t kLoadExtension[] = L"load-extension"; michael@0: michael@0: // Load an NPAPI plugin from the specified path. michael@0: const wchar_t kLoadPlugin[] = L"load-plugin"; michael@0: michael@0: // directory to locate user scripts in as an over-ride of the default michael@0: const wchar_t kUserScriptsDir[] = L"user-scripts-dir"; michael@0: michael@0: // Causes the browser to launch directly in incognito mode. michael@0: const wchar_t kIncognito[] = L"incognito"; michael@0: michael@0: // Turns on the accessibility in the renderer. Off by default until michael@0: // http://b/issue?id=1432077 is fixed. michael@0: const wchar_t kEnableRendererAccessibility[] = L"enable-renderer-accessibility"; michael@0: michael@0: // Pass the name of the current running automated test to Chrome. michael@0: const wchar_t kTestName[] = L"test-name"; michael@0: michael@0: // On POSIX only: the contents of this flag are prepended to the renderer michael@0: // command line. (Useful values might be "valgrind" or "gdb --args") michael@0: const wchar_t kRendererCmdPrefix[] = L"renderer-cmd-prefix"; michael@0: michael@0: // Temparary option for new ftp implemetation. michael@0: const wchar_t kNewFtp[] = L"new-ftp"; michael@0: michael@0: // On POSIX only: use FIFO for IPC channels so that "unrelated" process michael@0: // can connect to a channel, provided it knows its name. For debugging purposes. michael@0: const wchar_t kIPCUseFIFO[] = L"ipc-use-fifo"; michael@0: michael@0: // If this flag is set open out of process developer tools window instead of michael@0: // Console Debugger when user clicks "Debug JavaScript". michael@0: const wchar_t kEnableOutOfProcessDevTools[] = L"enable-oop-devtools"; michael@0: michael@0: // Enable HTML5 Worker support michael@0: const wchar_t kEnableWebWorkers[] = L"enable-web-workers"; michael@0: michael@0: // Causes the worker process allocation to use as many processes as cores. michael@0: const wchar_t kWebWorkerProcessPerCore[] = L"web-worker-process-per-core"; michael@0: michael@0: // Causes workers to run together in one process, depending on their domains. michael@0: // Note this is duplicated in webworkerclient_impl.cc michael@0: const wchar_t kWebWorkerShareProcesses[] = L"web-worker-share-processes"; michael@0: michael@0: // Enables experimental views under gtk. michael@0: const wchar_t kViewsGtk[] = L"views-gtk"; michael@0: michael@0: // Enables the bookmark menu. michael@0: const wchar_t kBookmarkMenu[] = L"bookmark-menu"; michael@0: michael@0: // Enables StatsTable, logging statistics to a global named shared memory table. michael@0: const wchar_t kEnableStatsTable[] = L"enable-stats-table"; michael@0: michael@0: // Enables the Omnibox2 popup and functionality. michael@0: const wchar_t kEnableOmnibox2[] = L"enable-omnibox2"; michael@0: michael@0: // Replaces the audio IPC layer for