diff options
author | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-22 00:01:08 +0000 |
---|---|---|
committer | dpranke@chromium.org <dpranke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-22 00:01:08 +0000 |
commit | 9e78ba23332c190da86ee478649d4c1bb1812e52 (patch) | |
tree | 8ec16ff9159a2b27c63b944b26b7b47793c11356 | |
parent | 3a668152e094f68f62b34b44db6b0249691773b4 (diff) | |
download | chromium_src-9e78ba23332c190da86ee478649d4c1bb1812e52.zip chromium_src-9e78ba23332c190da86ee478649d4c1bb1812e52.tar.gz chromium_src-9e78ba23332c190da86ee478649d4c1bb1812e52.tar.bz2 |
Revert r207951 - "Separate NaCl switches to their own file."
This change doesn't build under xcode for some reason. See
http://build.chromium.org/p/chromium.webkit/builders/Mac%20Builder%20%28dbg%29/builds/28702
TBR=thakis@chromium.org, yael.aharon@intel.com
BUG=244791
Review URL: https://codereview.chromium.org/16867015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207964 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed, 41 insertions, 145 deletions
diff --git a/chrome/app/DEPS b/chrome/app/DEPS index 77f6a4b..37cd670 100644 --- a/chrome/app/DEPS +++ b/chrome/app/DEPS @@ -8,7 +8,6 @@ include_rules = [ "+chrome/utility/chrome_content_utility_client.h", "+chromeos/chromeos_paths.h", "+components/breakpad/common/breakpad_paths.h", - "+components/nacl/common", "+content/public/app", "+content/public/browser/browser_main_runner.h", "+content/public/browser/render_process_host.h", diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm index 134b9c0..1a39ad5 100644 --- a/chrome/app/breakpad_mac.mm +++ b/chrome/app/breakpad_mac.mm @@ -32,7 +32,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/installer/util/google_update_settings.h" #include "components/breakpad/common/breakpad_paths.h" -#include "components/nacl/common/nacl_switches.h" #include "native_client/src/trusted/service_runtime/osx/crash_filter.h" #include "policy/policy_constants.h" diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index eef9d15..06f8c17 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -30,7 +30,6 @@ #include "chrome/plugin/chrome_content_plugin_client.h" #include "chrome/renderer/chrome_content_renderer_client.h" #include "chrome/utility/chrome_content_utility_client.h" -#include "components/nacl/common/nacl_switches.h" #include "content/public/common/content_client.h" #include "content/public/common/content_paths.h" #include "ui/base/ui_base_switches.h" @@ -529,20 +528,12 @@ void ChromeMainDelegate::PreSandboxStartup() { // Initialize ResourceBundle which handles files loaded from external // sources. The language should have been passed in to us from the // browser process as a command line flag. -#if defined(DISABLE_NACL) - DCHECK(command_line.HasSwitch(switches::kLang) || - process_type == switches::kZygoteProcess || - process_type == switches::kGpuProcess || - process_type == switches::kPpapiBrokerProcess || - process_type == switches::kPpapiPluginProcess); -#else DCHECK(command_line.HasSwitch(switches::kLang) || process_type == switches::kZygoteProcess || process_type == switches::kGpuProcess || process_type == switches::kNaClLoaderProcess || process_type == switches::kPpapiBrokerProcess || process_type == switches::kPpapiPluginProcess); -#endif // TODO(markusheintz): The command line flag --lang is actually processed // by the CommandLinePrefStore, and made available through the PrefService diff --git a/chrome/app/nacl_fork_delegate_linux.cc b/chrome/app/nacl_fork_delegate_linux.cc index 97bf1fd..c16603d 100644 --- a/chrome/app/nacl_fork_delegate_linux.cc +++ b/chrome/app/nacl_fork_delegate_linux.cc @@ -21,8 +21,8 @@ #include "base/process_util.h" #include "base/third_party/dynamic_annotations/dynamic_annotations.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/nacl_helper_linux.h" -#include "components/nacl/common/nacl_switches.h" NaClForkDelegate::NaClForkDelegate() : status_(kNaClHelperUnused), diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index d120548..db1ffd7 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS @@ -11,7 +11,6 @@ include_rules = [ "+components/auto_login_parser", "+components/breakpad", "+components/browser_context_keyed_service", - "+components/nacl/common", "+components/navigation_interception", "+components/user_prefs", "+components/visitedlink/browser", diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 9f9c41a..6e7add7 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -19,7 +19,6 @@ #include "chrome/browser/flags_storage.h" #include "chrome/common/chrome_content_client.h" #include "chrome/common/chrome_switches.h" -#include "components/nacl/common/nacl_switches.h" #include "content/public/browser/user_metrics.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/nacl_host/nacl_broker_host_win.cc b/chrome/browser/nacl_host/nacl_broker_host_win.cc index 74e4161..b8d2c4f 100644 --- a/chrome/browser/nacl_host/nacl_broker_host_win.cc +++ b/chrome/browser/nacl_host/nacl_broker_host_win.cc @@ -14,7 +14,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/nacl_cmd_line.h" #include "chrome/common/nacl_messages.h" -#include "components/nacl/common/nacl_switches.h" #include "content/public/browser/browser_child_process_host.h" #include "content/public/browser/child_process_data.h" #include "content/public/common/child_process_host.h" diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index d52ffca..05cec37 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -36,7 +36,6 @@ #include "chrome/common/nacl_host_messages.h" #include "chrome/common/nacl_messages.h" #include "chrome/common/render_messages.h" -#include "components/nacl/common/nacl_switches.h" #include "content/public/browser/browser_child_process_host.h" #include "content/public/browser/browser_ppapi_host.h" #include "content/public/browser/child_process_data.h" diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc index 7f36426..141008e 100644 --- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc +++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc @@ -9,7 +9,6 @@ #include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/ppapi/ppapi_test.h" -#include "components/nacl/common/nacl_switches.h" static const base::FilePath::CharType kMockNaClGdb[] = #if defined(OS_WIN) diff --git a/chrome/common/DEPS b/chrome/common/DEPS index 3e8aa9b..70cdc98 100644 --- a/chrome/common/DEPS +++ b/chrome/common/DEPS @@ -4,7 +4,6 @@ include_rules = [ "+chromeos", # For chromeos_switches.h "+components/autofill/core/common", "+components/breakpad/common", - "+components/nacl/common", "+device/bluetooth", # For BluetoothDevicePermission "+device/media_transfer_protocol", # For MediaTransferProtocolManager "+device/usb", # For UsbDevicePermission diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc index 337f9b9..5eb6591 100644 --- a/chrome/common/chrome_paths_win.cc +++ b/chrome/common/chrome_paths_win.cc @@ -17,7 +17,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/installer/util/browser_distribution.h" -#include "components/nacl/common/nacl_switches.h" namespace chrome { diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 64cb4e8..641115e 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -912,6 +912,33 @@ const char kMetricsRecordingOnly[] = "metrics-recording-only"; // Enables multiprofile Chrome. const char kMultiProfiles[] = "multi-profiles"; +// Causes the process to run as a NativeClient broker +// (used for launching NaCl loader processes on 64-bit Windows). +const char kNaClBrokerProcess[] = "nacl-broker"; + +// Uses NaCl manifest URL to choose whether NaCl program will be debugged by +// debug stub. +// Switch value format: [!]pattern1,pattern2,...,patternN. Each pattern uses +// the same syntax as patterns in Chrome extension manifest. The only difference +// is that * scheme matches all schemes instead of matching only http and https. +// If the value doesn't start with !, a program will be debugged if manifest URL +// matches any pattern. If the value starts with !, a program will be debugged +// if manifest URL does not match any pattern. +const char kNaClDebugMask[] = "nacl-debug-mask"; + +// Native Client GDB debugger that will be launched automatically when needed. +const char kNaClGdb[] = "nacl-gdb"; + +// GDB script to pass to the nacl-gdb debugger at startup. +const char kNaClGdbScript[] = "nacl-gdb-script"; + +// Causes the process to run as a NativeClient loader. +const char kNaClLoaderProcess[] = "nacl-loader"; + +// On POSIX only: the contents of this flag are prepended to the nacl-loader +// command line. Useful values might be "valgrind" or "xterm -e gdb --args". +const char kNaClLoaderCmdPrefix[] = "nacl-loader-cmd-prefix"; + // List of native messaging hosts outside of the default location. Used for // tests. The value must be comma-separate lists of key-value pairs separated // equal sign. E.g. "host1=/path/to/host1/manifest.json,host2=/path/host2.json". @@ -1384,6 +1411,9 @@ const char kTabCapture[] = "enable-tab-capture"; // Passes the name of the current running automated test to Chrome. const char kTestName[] = "test-name"; +// Runs the security test for the NaCl loader sandbox. +const char kTestNaClSandbox[] = "test-nacl-sandbox"; + // Type of the current test harness ("browser" or "ui"). const char kTestType[] = "test-type"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 7958283..532880c 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -249,6 +249,12 @@ extern const char kMemoryProfiling[]; extern const char kMessageLoopHistogrammer[]; extern const char kMetricsRecordingOnly[]; extern const char kMultiProfiles[]; +extern const char kNaClBrokerProcess[]; +extern const char kNaClDebugMask[]; +extern const char kNaClGdb[]; +extern const char kNaClGdbScript[]; +extern const char kNaClLoaderCmdPrefix[]; +extern const char kNaClLoaderProcess[]; extern const char kNativeMessagingHosts[]; extern const char kNetLogLevel[]; extern const char kNewProfileManagement[]; @@ -366,6 +372,7 @@ extern const char kSyncDisableOAuth2Token[]; extern const char kSyncfsEnableDirectoryOperation[]; extern const char kTabBrowserDragging[]; extern const char kTabCapture[]; +extern const char kTestNaClSandbox[]; extern const char kTestName[]; extern const char kTestType[]; extern const char kTestingChannelID[]; diff --git a/chrome/common/nacl_cmd_line.cc b/chrome/common/nacl_cmd_line.cc index 9fb1a0e..05c8af6 100644 --- a/chrome/common/nacl_cmd_line.cc +++ b/chrome/common/nacl_cmd_line.cc @@ -5,8 +5,6 @@ #include "base/basictypes.h" #include "base/command_line.h" #include "chrome/common/chrome_switches.h" -#include "components/nacl/common/nacl_switches.h" -#include "content/public/common/content_switches.h" namespace nacl { diff --git a/chrome/common_constants.gyp b/chrome/common_constants.gyp index fefe2da..7020f80 100644 --- a/chrome/common_constants.gyp +++ b/chrome/common_constants.gyp @@ -82,11 +82,6 @@ ['toolkit_uses_gtk == 1', { 'dependencies': ['../build/linux/system.gyp:gtk'], }], - ['OS != "ios"', { - 'dependencies': [ - '../components/nacl_common.gypi:nacl_switches', - ], - }], ], }, ], @@ -101,7 +96,6 @@ ], 'dependencies': [ '../base/base.gyp:base_nacl_win64', - '../components/nacl_common.gypi:nacl_switches_win64', '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', ], 'defines': [ diff --git a/chrome/nacl/DEPS b/chrome/nacl/DEPS index c5a003d..a3d7040 100644 --- a/chrome/nacl/DEPS +++ b/chrome/nacl/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+chrome/app/breakpad_win.h", - "+components/nacl", "+content/public/app/startup_helper_win.h", "+sandbox/linux/seccomp-bpf", "+sandbox/linux/services", diff --git a/chrome/nacl/nacl_broker_listener.cc b/chrome/nacl/nacl_broker_listener.cc index 1a49a1f..e310dfe 100644 --- a/chrome/nacl/nacl_broker_listener.cc +++ b/chrome/nacl/nacl_broker_listener.cc @@ -15,8 +15,6 @@ #include "chrome/common/nacl_cmd_line.h" #include "chrome/common/nacl_debug_exception_handler_win.h" #include "chrome/common/nacl_messages.h" -#include "components/nacl/common/nacl_switches.h" -#include "content/public/common/content_switches.h" #include "content/public/common/sandbox_init.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_switches.h" diff --git a/chrome/nacl/nacl_exe_win_64.cc b/chrome/nacl/nacl_exe_win_64.cc index 5201315..7ba3c40 100644 --- a/chrome/nacl/nacl_exe_win_64.cc +++ b/chrome/nacl/nacl_exe_win_64.cc @@ -12,13 +12,12 @@ #include "base/strings/string_util.h" #include "chrome/app/breakpad_win.h" #include "chrome/common/chrome_result_codes.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/logging_chrome.h" #include "chrome/nacl/nacl_broker_listener.h" #include "chrome/nacl/nacl_listener.h" #include "chrome/nacl/nacl_main_platform_delegate.h" -#include "components/nacl/common/nacl_switches.h" #include "content/public/app/startup_helper_win.h" -#include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "content/public/common/sandbox_init.h" #include "sandbox/win/src/sandbox_types.h" diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc index 21b4aa3..112a9c4 100644 --- a/chrome/nacl/nacl_main.cc +++ b/chrome/nacl/nacl_main.cc @@ -13,7 +13,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/nacl/nacl_listener.h" #include "chrome/nacl/nacl_main_platform_delegate.h" -#include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" // main() routine for the NaCl loader process. diff --git a/chrome/nacl/nacl_main_platform_delegate_mac.mm b/chrome/nacl/nacl_main_platform_delegate_mac.mm index 2b094b1..e304ea7 100644 --- a/chrome/nacl/nacl_main_platform_delegate_mac.mm +++ b/chrome/nacl/nacl_main_platform_delegate_mac.mm @@ -10,7 +10,7 @@ #include "base/logging.h" #include "base/native_library.h" #include "chrome/common/chrome_sandbox_type_mac.h" -#include "components/nacl/common/nacl_switches.h" +#include "chrome/common/chrome_switches.h" #include "content/public/common/sandbox_init.h" NaClMainPlatformDelegate::NaClMainPlatformDelegate( diff --git a/chrome/nacl/nacl_main_platform_delegate_win.cc b/chrome/nacl/nacl_main_platform_delegate_win.cc index be37857..abd9b3e 100644 --- a/chrome/nacl/nacl_main_platform_delegate_win.cc +++ b/chrome/nacl/nacl_main_platform_delegate_win.cc @@ -8,7 +8,7 @@ #include "base/files/file_path.h" #include "base/logging.h" #include "base/native_library.h" -#include "components/nacl/common/nacl_switches.h" +#include "chrome/common/chrome_switches.h" #include "sandbox/win/src/sandbox.h" NaClMainPlatformDelegate::NaClMainPlatformDelegate( diff --git a/components/nacl/OWNERS b/components/nacl/OWNERS deleted file mode 100644 index 8345057..0000000 --- a/components/nacl/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -bradchen@chromium.org -bradnelson@chromium.org -jvoung@chromium.org -mseaborn@chromium.org -noelallen@chromium.org -sehr@chromium.org diff --git a/components/nacl/common/nacl_switches.cc b/components/nacl/common/nacl_switches.cc deleted file mode 100644 index d2a01d5..0000000 --- a/components/nacl/common/nacl_switches.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/nacl/common/nacl_switches.h" - -namespace switches { - -// Causes the process to run as a NativeClient broker -// (used for launching NaCl loader processes on 64-bit Windows). -const char kNaClBrokerProcess[] = "nacl-broker"; - -// Uses NaCl manifest URL to choose whether NaCl program will be debugged by -// debug stub. -// Switch value format: [!]pattern1,pattern2,...,patternN. Each pattern uses -// the same syntax as patterns in Chrome extension manifest. The only difference -// is that * scheme matches all schemes instead of matching only http and https. -// If the value doesn't start with !, a program will be debugged if manifest URL -// matches any pattern. If the value starts with !, a program will be debugged -// if manifest URL does not match any pattern. -const char kNaClDebugMask[] = "nacl-debug-mask"; - -// Native Client GDB debugger that will be launched automatically when needed. -const char kNaClGdb[] = "nacl-gdb"; - -// GDB script to pass to the nacl-gdb debugger at startup. -const char kNaClGdbScript[] = "nacl-gdb-script"; - -// On POSIX only: the contents of this flag are prepended to the nacl-loader -// command line. Useful values might be "valgrind" or "xterm -e gdb --args". -const char kNaClLoaderCmdPrefix[] = "nacl-loader-cmd-prefix"; - -// Causes the process to run as a NativeClient loader. -const char kNaClLoaderProcess[] = "nacl-loader"; - -// Runs the security test for the NaCl loader sandbox. -const char kTestNaClSandbox[] = "test-nacl-sandbox"; - -} // namespace switches diff --git a/components/nacl/common/nacl_switches.h b/components/nacl/common/nacl_switches.h deleted file mode 100644 index 132ac7a..0000000 --- a/components/nacl/common/nacl_switches.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Defines all the command-line switches used by Chrome. - -#ifndef COMPONENTS_NACL_COMMON_NACL_SWITCHES_H_ -#define COMPONENTS_NACL_COMMON_NACL_SWITCHES_H_ - -namespace switches { - -// All switches in alphabetical order. The switches should be documented -// alongside the definition of their values in the .cc file. -extern const char kNaClBrokerProcess[]; -extern const char kNaClDebugMask[]; -extern const char kNaClGdb[]; -extern const char kNaClGdbScript[]; -extern const char kNaClLoaderCmdPrefix[]; -extern const char kNaClLoaderProcess[]; -extern const char kTestNaClSandbox[]; - -} // namespace switches - -#endif // COMPONENTS_NACL_COMMON_NACL_SWITCHES_H_ diff --git a/components/nacl_common.gypi b/components/nacl_common.gypi deleted file mode 100644 index 00137c5..0000000 --- a/components/nacl_common.gypi +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'nacl_switches', - 'type': 'static_library', - 'sources': [ - 'nacl/common/nacl_switches.cc', - 'nacl/common/nacl_switches.h', - ], - 'include_dirs': [ - '..', - ], - }, - ], - 'conditions': [ - ['OS=="win" and target_arch=="ia32"', { - 'targets': [ - { - 'target_name': 'nacl_switches_win64', - 'type': 'static_library', - 'sources': [ - 'nacl/common/nacl_switches.cc', - 'nacl/common/nacl_switches.h', - ], - 'include_dirs': [ - '..', - ], - 'configurations': { - 'Common_Base': { - 'msvs_target_platform': 'x64', - }, - }, - }, - ], - }], - ], -} |