diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/chrome_dll.gypi | 8 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 5 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 224 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 74 | ||||
-rw-r--r-- | chrome/renderer/renderer_main_platform_delegate_linux.cc | 3 |
5 files changed, 21 insertions, 293 deletions
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index 7775876..194ece1 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -604,6 +604,14 @@ # Stub entry points for process types that are not supported # by NaCl Win64 executable 'app/dummy_main_functions.cc', + + # TODO(bradnelson): once automatic generation of 64 bit targets on + # Windows is ready, take this out and add a dependency on + # content_common.gypi and common.gypi in nacl_win64_dependencies + # and get rid of the common_constants.gypi which was added as a hack + # to avoid making common compile on 64 bit on Windows. + '../content/common/content_switches.cc', + '../content/common/content_switches.h', ], 'msvs_settings': { 'VCLinkerTool': { diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 99270c0..9d22d11 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -24,6 +24,11 @@ 'app/hard_error_handler_win.cc', 'app/hard_error_handler_win.h', 'app/scoped_ole_initializer.h', + # TODO(bradnelson): once automatic generation of 64 bit targets on + # Windows is ready, take this out and add a dependency on + # content_common.gypi. + '../content/common/content_switches.cc', + '../content/common/content_switches.h', ], 'mac_bundle_resources': [ 'app/app-Info.plist', diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 6995e51..c6febe0 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -5,7 +5,6 @@ #include "chrome/common/chrome_switches.h" #include "base/base_switches.h" -#include "base/command_line.h" namespace switches { @@ -18,10 +17,6 @@ namespace switches { // is launched on the command line (e.g. by Selenium). Only needed on Mac. const char kActivateOnLaunch[] = "activate-on-launch"; -// By default, file:// URIs cannot read other file:// URIs. This is an -// override for developers who need the old behavior for testing. -const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files"; - // On ChromeOS, file:// access is disabled except for certain whitelisted // directories. This switch re-enables file:// for testing. const char kAllowFileAccess[] = "allow-file-access"; @@ -35,9 +30,6 @@ const char kAllowOutdatedPlugins[] = "allow-outdated-plugins"; // connections. const char kAllowSSLMITMProxies[] = "allow-ssl-mitm-proxies"; -// Allows debugging of sandboxed processes (see zygote_main_linux.cc). -const char kAllowSandboxDebugging[] = "allow-sandbox-debugging"; - // Allows injecting extensions and user scripts on the extensions // gallery site. Normally prevented for security reasons, but can be // useful for automation testing of the gallery. @@ -202,10 +194,6 @@ const char kDisableBackgroundMode[] = "disable-background-mode"; // in the measurements. const char kDisableBackgroundNetworking[] = "disable-background-networking"; -// Disable limits on the number of backing stores. Can prevent blinking for -// users with many windows/tabs and lots of memory. -const char kDisableBackingStoreLimit[] = "disable-backing-store-limit"; - // Disable the Confirm to Quit experiment (Mac only). const char kDisableConfirmToQuit[] = "disable-confirm-to-quit"; @@ -250,9 +238,6 @@ const char kDisableExtensions[] = "disable-extensions"; const char kDisableExtensionsFileAccessCheck[] = "disable-extensions-file-access-check"; -// Disable FileSystem API. -const char kDisableFileSystem[] = "disable-file-system"; - // Disables the sandbox for the built-in flash player. const char kDisableFlashSandbox[] = "disable-flash-sandbox"; @@ -265,13 +250,6 @@ const char kDisableGLMultisampling[] = "disable-gl-multisampling"; // Disable the GLSL translator. const char kDisableGLSLTranslator[] = "disable-glsl-translator"; -// Disable the GPU process sandbox. -const char kDisableGpuSandbox[] = "disable-gpu-sandbox"; - -// Disable the thread that crashes the GPU process if it stops responding to -// messages. -const char kDisableGpuWatchdog[] = "disable-gpu-watchdog"; - // Suppresses hang monitor dialogs in renderer processes. This may allow slow // unload handlers on a page to prevent the tab from closing, but the Task // Manager can be used to terminate the offending process in this case. @@ -311,20 +289,10 @@ const char kDisableJava[] = "disable-java"; // Disable LocalStorage. const char kDisableLocalStorage[] = "disable-local-storage"; -// Force logging to be disabled. Logging is enabled by default in debug -// builds. -const char kDisableLogging[] = "disable-logging"; - // Whether we should prevent the new tab page from showing the first run // notification. const char kDisableNewTabFirstRun[] = "disable-new-tab-first-run"; -// Prevent plugins from running. -const char kDisablePlugins[] = "disable-plugins"; - -// Disable pop-up blocking. -const char kDisablePopupBlocking[] = "disable-popup-blocking"; - // Normally when the user attempts to navigate to a page that was the result of // a post we prompt to make sure they want to. This switch may be used to // disable that check. This switch is used during automated testing. @@ -410,9 +378,6 @@ const char kDisableWebResources[] = "disable-web-resources"; // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[] = "disable-web-security"; -// Disable Web Sockets support. -const char kDisableWebSockets[] = "disable-web-sockets"; - // Disable WebKit's XSSAuditor. The XSSAuditor mitigates reflective XSS. const char kDisableXSSAuditor[] = "disable-xss-auditor"; @@ -462,9 +427,6 @@ const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs"; // for more background. const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port"; -// Enables the benchmarking extensions. -const char kEnableBenchmarking[] = "enable-benchmarking"; - // In the browser process this switch is used to enable or disable the // client-side phishing detection. In the renderer this switch is only enabled // if this switch is enabled in the browser and the user has opted in to UMA @@ -544,24 +506,12 @@ const char kEnableInBrowserThumbnailing[] = "enable-in-browser-thumbnailing"; // This flag overrides "disable-ipv6" which appears elswhere in this file. const char kEnableIPv6[] = "enable-ipv6"; -// Enable the GPU plugin and Pepper 3D rendering. -const char kEnableGPUPlugin[] = "enable-gpu-plugin"; - // Enable experimental JavaScript I18N API. const char kEnableJavaScriptI18NAPI[] = "enable-javascript-i18n-api"; -// Force logging to be enabled. Logging is disabled by default in release -// builds. -const char kEnableLogging[] = "enable-logging"; - // Allows reporting memory info (JS heap size) to page. const char kEnableMemoryInfo[] = "enable-memory-info"; -// On Windows, converts the page to the currently-installed monitor profile. -// This does NOT enable color management for images. The source is still -// assumed to be sRGB. -const char kEnableMonitorProfile[] = "enable-monitor-profile"; - // Runs the Native Client inside the renderer process and enables GPU plugin // (internally adds lEnableGpuPlugin to the command line). const char kEnableNaCl[] = "enable-nacl"; @@ -583,9 +533,6 @@ const char kEnableP2PApi[] = "enable-p2papi"; // Enable speculative TCP/IP preconnection. const char kEnablePreconnect[] = "enable-preconnect"; -// Enable caching of pre-parsed JS script data. See http://crbug.com/32407. -const char kEnablePreparsedJsCaching[] = "enable-preparsed-js-caching"; - // Enable print preview (work in progress). const char kEnablePrintPreview[] = "enable-print-preview"; @@ -599,9 +546,6 @@ const char kEnableSnapStart[] = "enable-snap-start"; // Enables speech input. const char kEnableSpeechInput[] = "enable-speech-input"; -// Enables StatsTable, logging statistics to a global named shared memory table. -const char kEnableStatsTable[] = "enable-stats-table"; - // Enable syncing browser data to a Google Account. const char kEnableSync[] = "enable-sync"; @@ -642,13 +586,6 @@ const char kEnableWatchdog[] = "enable-watchdog"; // Enable web audio API. const char kEnableWebAudio[] = "enable-webaudio"; -// Enables experimental features for the geolocation API. -// Current features: -// - CoreLocation support for Mac OS X 10.6 -// - Gateway location for Linux and Windows -// - Location platform support for Windows 7 -const char kExperimentalLocationFeatures[] = "experimental-location-features"; - // Enables experimental features for Spellchecker. Right now, the first // experimental feature is auto spell correct, which corrects words which are // misppelled by typing the word with two consecutive letters swapped. The @@ -708,16 +645,6 @@ const char kForceFieldTestNameAndValue[] = "force-fieldtest"; // overrides this if present. const char kForceRendererAccessibility[] = "force-renderer-accessibility"; -// Extra command line options for launching the GPU process (normally used -// for debugging). Use like renderer-cmd-prefix. -const char kGpuLauncher[] = "gpu-launcher"; - -// Makes this process a GPU sub-process. -const char kGpuProcess[] = "gpu-process"; - -// Causes the GPU process to display a dialog on launch. -const char kGpuStartupDialog[] = "gpu-startup-dialog"; - // Specifies a custom name for the GSSAPI library to load. const char kGSSAPILibraryName[] = "gssapi-library-name"; @@ -799,19 +726,6 @@ const char kLoadExtension[] = "load-extension"; // Uninstall an extension with the specified extension id. const char kUninstallExtension[] = "uninstall-extension"; -// Load an NPAPI plugin from the specified path. -const char kLoadPlugin[] = "load-plugin"; - -// Load NPAPI plugins from the specified directory. -const char kExtraPluginDir[] = "extra-plugin-dir"; - -// Make plugin processes log their sent and received messages to VLOG(1). -const char kLogPluginMessages[] = "log-plugin-messages"; - -// Sets the minimum log level. Valid values are from 0 to 3: -// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3. -const char kLoggingLevel[] = "log-level"; - // Make Chrome default browser const char kMakeDefaultBrowser[] = "make-default-browser"; @@ -874,9 +788,6 @@ const char kNoExperiments[] = "no-experiments"; // you're for some reason tempted to pass them both. const char kNoFirstRun[] = "no-first-run"; -// Don't Sandbox the GPU process, does not affect other sandboxed processes. -const char kNoGpuSandbox[] = "no-gpu-sandbox"; - // Support a separate switch that enables the v8 playback extension. // The extension causes javascript calls to Date.now() and Math.random() // to return consistent values, such that subsequent loads of the same @@ -891,9 +802,6 @@ const char kNoPings[] = "no-pings"; // other proxy server flags that are passed. const char kNoProxyServer[] = "no-proxy-server"; -// Don't send HTTP-Referer headers. -const char kNoReferrers[] = "no-referrers"; - // Disables the sandbox for all process types that are normally sandboxed. const char kNoSandbox[] = "no-sandbox"; @@ -937,32 +845,6 @@ const char kPlaybackMode[] = "playback-mode"; // specifically) will store its state. const char kPluginDataDir[] = "plugin-data-dir"; -// Specifies a command that should be used to launch the plugin process. Useful -// for running the plugin process through purify or quantify. Ex: -// --plugin-launcher="path\to\purify /Run=yes" -const char kPluginLauncher[] = "plugin-launcher"; - -// Tells the plugin process the path of the plugin to load -const char kPluginPath[] = "plugin-path"; - -// Causes the process to run as a plugin subprocess. -const char kPluginProcess[] = "plugin"; - -// Causes the plugin process to display a dialog on launch. -const char kPluginStartupDialog[] = "plugin-startup-dialog"; - -// Runs PPAPI (Pepper) plugins out-of-process. -const char kPpapiOutOfProcess[] = "ppapi-out-of-process"; - -// Like kPluginLauncher for PPAPI plugins. -const char kPpapiPluginLauncher[] = "ppapi-plugin-launcher"; - -// Argument to the process type that indicates a PPAPI plugin process type. -const char kPpapiPluginProcess[] = "ppapi"; - -// Causes the PPAPI sub process to display a dialog on launch. -const char kPpapiStartupDialog[] = "ppapi-startup-dialog"; - // Controls speculative prerendering of pages, and content prefetching. Both // are dispatched from <link rel=prefetch href=...> elements. const char kPrerender[] = "prerender"; @@ -979,22 +861,6 @@ const char kPrerenderSwitchValuePrefetchOnly[] = "prefetch_only"; // Prints the pages on the screen. const char kPrint[] = "print"; -// Runs a single process for each site (i.e., group of pages from the same -// registered domain) the user visits. We default to using a renderer process -// for each site instance (i.e., group of pages from the same registered -// domain with script connections to each other). -const char kProcessPerSite[] = "process-per-site"; - -// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own -// renderer process. We default to using a renderer process for each -// site instance (i.e., group of pages from the same registered domain with -// script connections to each other). -const char kProcessPerTab[] = "process-per-tab"; - -// The value of this switch determines whether the process is started as a -// renderer or plugin host. If it's empty, it's the browser. -const char kProcessType[] = "type"; - // Output the product version information and quit. Used as an internal api to // detect the installed version of Chrome on Linux. const char kProductVersion[] = "product-version"; @@ -1052,9 +918,6 @@ const char kPurgeMemoryButton[] = "purge-memory-button"; // See also kPlaybackMode. const char kRecordMode[] = "record-mode"; -// Register pepper plugins that should be loaded into the renderer. -const char kRegisterPepperPlugins[] = "register-pepper-plugins"; - // Reload pages that have been killed when they are next focused by the user. const char kReloadKilledTabs[] = "reload-killed-tabs"; @@ -1072,28 +935,12 @@ const char kRendererAssertTest[] = "renderer-assert-test"; const char kRendererCheckFalseTest[] = "renderer-check-false-test"; #endif -// On POSIX only: the contents of this flag are prepended to the renderer -// command line. Useful values might be "valgrind" or "xterm -e gdb --args". -const char kRendererCmdPrefix[] = "renderer-cmd-prefix"; - -// Causes the renderer process to crash on launch. -const char kRendererCrashTest[] = "renderer-crash-test"; - -// Causes the process to run as renderer instead of as browser. -const char kRendererProcess[] = "renderer"; - -// Causes the renderer process to display a dialog on launch. -const char kRendererStartupDialog[] = "renderer-startup-dialog"; - // Indicates the last session should be restored on startup. This overrides // the preferences value and is primarily intended for testing. The value of // this switch is the number of tabs to wait until loaded before // 'load completed' is sent to the ui_test. const char kRestoreLastSession[] = "restore-last-session"; -// Runs the plugin processes inside the sandbox. -const char kSafePlugins[] = "safe-plugins"; - // URL prefix used by safebrowsing to fetch hash, download data and // report malware. const char kSbInfoURLPrefix[] = "safebrowsing-info-url-prefix"; @@ -1157,9 +1004,6 @@ const char kSilentDumpOnDCHECK[] = "silent-dump-on-dcheck"; // is cleaned up and playback testing completed. const char kSimpleDataSource[] = "simple-data-source"; -// Runs the renderer and plugins in the same process as the browser -const char kSingleProcess[] = "single-process"; - // Start the browser maximized, regardless of any previous settings. const char kStartMaximized[] = "start-maximized"; @@ -1195,9 +1039,6 @@ const char kNewSyncerThread[] = "new-syncer-thread"; // Pass the name of the current running automated test to Chrome. const char kTestName[] = "test-name"; -// Runs the security test for the renderer sandbox. -const char kTestSandbox[] = "test-sandbox"; - // Runs the security test for the NaCl loader sandbox. const char kTestNaClSandbox[] = "test-nacl-sandbox"; @@ -1232,20 +1073,6 @@ const char kMaxSpdySessionsPerDomain[] = "max-spdy-sessions-per-domain"; // Set the maximum concurrent streams over a SPDY session. const char kMaxSpdyConcurrentStreams[] = "max-spdy-concurrent-streams"; -// Grant unlimited quota to store files to this process. -// Used for testing Pepper's FileRef/FileIO/FileSystem implementations. -// DO NOT USE FOR OTHER PURPOSES. -// TODO(dumi): remove the switch when we have a real quota implementation. -const char kUnlimitedQuotaForFiles[] = "unlimited-quota-for-files"; - -// This is for testing IndexedDB and will give any website you visit unlimited -// quota in IndexedDB. This should only be used for development and not general -// browsing. It is ignored in single process mode. -const char kUnlimitedQuotaForIndexedDB[] = "unlimited-quota-for-indexeddb"; - -// A string used to override the default user agent with a custom one. -const char kUserAgent[] = "user-agent"; - // Specifies the user data directory, which is where the browser will look // for all of its state. const char kUserDataDir[] = "user-data-dir"; @@ -1268,35 +1095,10 @@ const char kUtilityProcessAllowedDir[] = "utility-allowed-dir"; // Print version information and quit. const char kVersion[] = "version"; -// Will add kWaitForDebugger to every child processes. If a value is passed, it -// will be used as a filter to determine if the child process should have the -// kWaitForDebugger flag passed on or not. -const char kWaitForDebuggerChildren[] = "wait-for-debugger-children"; - -// Choose which logging channels in WebCore to activate. See -// Logging.cpp in WebKit's WebCore for a list of available channels. -const char kWebCoreLogChannels[] = "webcore-log-channels"; - -// Causes the worker process allocation to use as many processes as cores. -const char kWebWorkerProcessPerCore[] = "web-worker-process-per-core"; - -// Causes workers to run together in one process, depending on their domains. -// Note this is duplicated in webworkerclient_impl.cc -const char kWebWorkerShareProcesses[] = "web-worker-share-processes"; - // Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is // to use Chromium's network stack to fetch, and V8 to evaluate. const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver"; -// Causes the process to run as a worker subprocess. -const char kWorkerProcess[] = "worker"; - -// The prefix used when starting the zygote process. (i.e. 'gdb --args') -const char kZygoteCmdPrefix[] = "zygote-cmd-prefix"; - -// Causes the process to run as a renderer zygote. -const char kZygoteProcess[] = "zygote"; - #if defined(OS_CHROMEOS) // Enable the redirection of viewable document requests to the Google // Document Viewer. @@ -1398,16 +1200,7 @@ const char kPasswordStore[] = "password-store"; #endif #endif -#if defined(OS_MACOSX) -// Temporary flag to disable hole punching for accelerated surfaces. This is -// here to aid debugging eventual problems, it can be removed once hole punching -// has been out there for a few dev channel releases without problems. -const char kDisableHolePunching[] = "disable-hole-punching"; - -// Cause the OS X sandbox write to syslog every time an access to a resource -// is denied by the sandbox. -const char kEnableSandboxLogging[] = "enable-sandbox-logging"; -#else +#if !defined(OS_MACOSX) // Enable Kiosk mode. const char kKioskMode[] = "kiosk"; #endif @@ -1443,21 +1236,6 @@ const char kTouchDevices[] = "touch-devices"; #endif -// SeccompSandboxEnabled() controls whether we are using Seccomp. -// It is currently off by default on all platforms. -// TODO(evan): unify all of these once we turn the seccomp sandbox always -// on. Also remove the #include of command_line.h above. - -// Disable the seccomp sandbox (Linux only) -const char kDisableSeccompSandbox[] = "disable-seccomp-sandbox"; -// Enable the seccomp sandbox (Linux only) -const char kEnableSeccompSandbox[] = "enable-seccomp-sandbox"; - -bool SeccompSandboxEnabled() { - return CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableSeccompSandbox); -} - // ----------------------------------------------------------------------------- // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. // diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 819522c..5eafff2 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -11,22 +11,22 @@ #include "build/build_config.h" #include "base/base_switches.h" +#include "content/common/content_switches.h" namespace switches { // ----------------------------------------------------------------------------- -// Can't find the switch you are looking for? Try looking in -// base/base_switches.cc instead. +// Can't find the switch you are looking for? Try looking in app/app_switches.cc +// or base/base_switches.cc or content/common/content_switches.cc or +// media/base/media_switches.cc instead. // ----------------------------------------------------------------------------- // All switches in alphabetical order. The switches should be documented // alongside the definition of their values in the .cc file. extern const char kActivateOnLaunch[]; -extern const char kAllowFileAccessFromFiles[]; extern const char kAllowFileAccess[]; extern const char kAllowOutdatedPlugins[]; extern const char kAllowSSLMITMProxies[]; -extern const char kAllowSandboxDebugging[]; extern const char kAllowScriptingGallery[]; extern const char kAlwaysAuthorizePlugins[]; extern const char kAlwaysEnableDevTools[]; @@ -67,7 +67,6 @@ extern const char kDisableAudio[]; extern const char kDisableAuthNegotiateCnameLookup[]; extern const char kDisableBackgroundMode[]; extern const char kDisableBackgroundNetworking[]; -extern const char kDisableBackingStoreLimit[]; extern const char kDisableBlockContentAnimation[]; extern const char kDisableConfirmToQuit[]; extern const char kDisableConnectBackupJobs[]; @@ -80,13 +79,10 @@ extern const char kDisableEnforcedThrottling[]; extern const char kDisableExperimentalWebGL[]; extern const char kDisableExtensionsFileAccessCheck[]; extern const char kDisableExtensions[]; -extern const char kDisableFileSystem[]; extern const char kDisableFlashSandbox[]; extern const char kDisableGLMultisampling[]; extern const char kDisableGLSLTranslator[]; extern const char kDisableGeolocation[]; -extern const char kDisableGpuSandbox[]; -extern const char kDisableGpuWatchdog[]; extern const char kDisableHangMonitor[]; extern const char kDisableHistoryQuickProvider[]; extern const char kDisableHistoryURLProvider[]; @@ -97,10 +93,7 @@ extern const char kDisableIPv6[]; extern const char kDisableJavaScript[]; extern const char kDisableJava[]; extern const char kDisableLocalStorage[]; -extern const char kDisableLogging[]; extern const char kDisableNewTabFirstRun[]; -extern const char kDisablePlugins[]; -extern const char kDisablePopupBlocking[]; extern const char kDisablePreconnect[]; extern const char kDisablePromptOnRepost[]; extern const char kDisableRemoteFonts[]; @@ -124,7 +117,6 @@ extern const char kDisableTabCloseableStateWatcher[]; extern const char kDisableTranslate[]; extern const char kDisableWebResources[]; extern const char kDisableWebSecurity[]; -extern const char kDisableWebSockets[]; extern const char kDisableXSSAuditor[]; extern const char kDiskCacheDir[]; extern const char kDiskCacheSize[]; @@ -138,7 +130,6 @@ extern const char kEnableAcceleratedPlugins[]; extern const char kEnableAccessibility[]; extern const char kEnableAeroPeekTabs[]; extern const char kEnableAuthNegotiatePort[]; -extern const char kEnableBenchmarking[]; extern const char kEnableClientSidePhishingDetection[]; extern const char kEnableClientSidePhishingInterstitial[]; extern const char kEnableClearServerData[]; @@ -156,26 +147,21 @@ extern const char kEnableExtensionTimelineApi[]; extern const char kEnableFastback[]; extern const char kEnableFileCookies[]; extern const char kEnableFileSystemURLScheme[]; -extern const char kEnableGPUPlugin[]; extern const char kEnableHistoryQuickProvider[]; extern const char kEnableInBrowserThumbnailing[]; extern const char kEnableIPv6[]; extern const char kEnableJavaScriptI18NAPI[]; -extern const char kEnableLogging[]; extern const char kEnableMemoryInfo[]; -extern const char kEnableMonitorProfile[]; extern const char kEnableNaCl[]; extern const char kEnableNaClDebug[]; extern const char kEnableP2PApi[]; extern const char kEnablePreconnect[]; -extern const char kEnablePreparsedJsCaching[]; extern const char kEnablePrintPreview[]; extern const char kEnableRemoting[]; extern const char kEnableResourceContentSettings[]; extern const char kEnableSearchProviderApiV2[]; extern const char kEnableSnapStart[]; extern const char kEnableSpeechInput[]; -extern const char kEnableStatsTable[]; extern const char kEnableSync[]; extern const char kEnableSyncAutofill[]; extern const char kEnableSyncPreferences[]; @@ -189,10 +175,7 @@ extern const char kEnableVideoFullscreen[]; extern const char kEnableVideoLogging[]; extern const char kEnableWatchdog[]; extern const char kEnableWebAudio[]; -// Experimental features. -extern const char kExperimentalLocationFeatures[]; extern const char kExperimentalSpellcheckerFeatures[]; -// End experimental features. extern const char kExplicitlyAllowedPorts[]; extern const char kExtensionProcess[]; extern const char kExtensionsUpdateFrequency[]; @@ -205,9 +188,6 @@ extern const char kForceAppsPromoVisible[]; extern const char kForceFieldTestNameAndValue[]; extern const char kForceRendererAccessibility[]; extern const char kForceStubLibcros[]; -extern const char kGpuLauncher[]; -extern const char kGpuProcess[]; -extern const char kGpuStartupDialog[]; extern const char kGSSAPILibraryName[]; extern const char kHelp[]; extern const char kHelpShort[]; @@ -228,11 +208,7 @@ extern const char kJavaScriptFlags[]; extern const char kKeepAliveForTest[]; extern const char kLoadExtension[]; extern const char kUninstallExtension[]; -extern const char kLoadPlugin[]; -extern const char kExtraPluginDir[]; extern const char kLogNetLog[]; -extern const char kLogPluginMessages[]; -extern const char kLoggingLevel[]; extern const char kMakeDefaultBrowser[]; extern const char kMediaCacheSize[]; extern const char kMemoryProfiling[]; @@ -249,10 +225,8 @@ extern const char kNoDefaultBrowserCheck[]; extern const char kNoEvents[]; extern const char kNoExperiments[]; extern const char kNoFirstRun[]; -extern const char kNoGpuSandbox[]; extern const char kNoJsRandomness[]; extern const char kNoProxyServer[]; -extern const char kNoReferrers[]; extern const char kNoPings[]; extern const char kNoSandbox[]; extern const char kNoServiceAutorun[]; @@ -266,23 +240,12 @@ extern const char kPackExtensionKey[]; extern const char kParentProfile[]; extern const char kPlaybackMode[]; extern const char kPluginDataDir[]; -extern const char kPluginLauncher[]; -extern const char kPluginPath[]; -extern const char kPluginProcess[]; -extern const char kPluginStartupDialog[]; -extern const char kPpapiOutOfProcess[]; -extern const char kPpapiPluginLauncher[]; -extern const char kPpapiPluginProcess[]; -extern const char kPpapiStartupDialog[]; extern const char kPrerender[]; extern const char kPrerenderSwitchValueAuto[]; extern const char kPrerenderSwitchValueDisabled[]; extern const char kPrerenderSwitchValueEnabled[]; extern const char kPrerenderSwitchValuePrefetchOnly[]; extern const char kPrint[]; -extern const char kProcessPerSite[]; -extern const char kProcessPerTab[]; -extern const char kProcessType[]; extern const char kProductVersion[]; extern const char kProfileImportProcess[]; extern const char kProfilingAtStart[]; @@ -294,17 +257,11 @@ extern const char kProxyPacUrl[]; extern const char kProxyServer[]; extern const char kPurgeMemoryButton[]; extern const char kRecordMode[]; -extern const char kRegisterPepperPlugins[]; extern const char kReloadKilledTabs[]; extern const char kRemoteDebuggingPort[]; extern const char kRemoteShellPort[]; extern const char kRendererAssertTest[]; -extern const char kRendererCmdPrefix[]; -extern const char kRendererCrashTest[]; -extern const char kRendererProcess[]; -extern const char kRendererStartupDialog[]; extern const char kRestoreLastSession[]; -extern const char kSafePlugins[]; extern const char kSbInfoURLPrefix[]; extern const char kSbMacKeyURLPrefix[]; extern const char kSbDisableAutoUpdate[]; @@ -319,7 +276,6 @@ extern const char kShowIcons[]; extern const char kShowPaintRects[]; extern const char kSilentDumpOnDCHECK[]; extern const char kSimpleDataSource[]; -extern const char kSingleProcess[]; extern const char kStartMaximized[]; extern const char kSyncAllowInsecureXmppConnection[]; extern const char kSyncInvalidateXmppLogin[]; @@ -331,7 +287,6 @@ extern const char kSyncTrySsltcpFirstForXmpp[]; extern const char kNewSyncerThread[]; extern const char kTestNaClSandbox[]; extern const char kTestName[]; -extern const char kTestSandbox[]; extern const char kTestType[]; extern const char kTestingChannelID[]; extern const char kTrustedPlugins[]; @@ -341,23 +296,13 @@ extern const char kUseSpdy[]; extern const char kIgnoreCertificateErrors[]; extern const char kMaxSpdySessionsPerDomain[]; extern const char kMaxSpdyConcurrentStreams[]; -extern const char kUnlimitedQuotaForFiles[]; -extern const char kUnlimitedQuotaForIndexedDB[]; -extern const char kUserAgent[]; extern const char kUserDataDir[]; extern const char kUserScriptsDir[]; extern const char kUtilityCmdPrefix[]; extern const char kUtilityProcess[]; extern const char kUtilityProcessAllowedDir[]; extern const char kVersion[]; -extern const char kWaitForDebuggerChildren[]; -extern const char kWebCoreLogChannels[]; -extern const char kWebWorkerProcessPerCore[]; -extern const char kWebWorkerShareProcesses[]; extern const char kWinHttpProxyResolver[]; -extern const char kWorkerProcess[]; -extern const char kZygoteCmdPrefix[]; -extern const char kZygoteProcess[]; #if defined(OS_CHROMEOS) extern const char kEnableGView[]; @@ -408,10 +353,7 @@ extern const char kEnableSyncPasswords[]; extern const char kDisableSyncPasswords[]; #endif -#if defined(OS_MACOSX) -extern const char kDisableHolePunching[]; -extern const char kEnableSandboxLogging[]; -#else +#if !defined(OS_MACOSX) extern const char kKioskMode[]; #endif @@ -434,12 +376,6 @@ extern const char kRendererCheckFalseTest[]; extern const char kTouchDevices[]; #endif -extern const char kDisableSeccompSandbox[]; -extern const char kEnableSeccompSandbox[]; - -// Return true if the switches indicate the seccomp sandbox is enabled. -bool SeccompSandboxEnabled(); - // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in // alphabetical order, or in one of the ifdefs (also in order in each section). diff --git a/chrome/renderer/renderer_main_platform_delegate_linux.cc b/chrome/renderer/renderer_main_platform_delegate_linux.cc index 045e0cc..9a201bc 100644 --- a/chrome/renderer/renderer_main_platform_delegate_linux.cc +++ b/chrome/renderer/renderer_main_platform_delegate_linux.cc @@ -40,7 +40,8 @@ bool RendererMainPlatformDelegate::EnableSandbox() { // N.b. SupportsSeccompSandbox() returns a cached result, as we already // called it earlier in the zygote. Thus, it is OK for us to not pass in // a file descriptor for "/proc". - if (switches::SeccompSandboxEnabled() && SupportsSeccompSandbox(-1)) + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableSeccompSandbox) && SupportsSeccompSandbox(-1)) StartSeccompSandbox(); #endif return true; |