Commit 9e78ba23 authored by dpranke@chromium.org's avatar dpranke@chromium.org

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
parent 3a668152
......@@ -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",
......
......@@ -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"
......
......@@ -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
......
......@@ -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),
......
......@@ -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",
......
......@@ -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"
......
......@@ -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"
......
......@@ -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"
......
......@@ -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)
......
......@@ -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
......
......@@ -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 {
......
......@@ -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";
......
......@@ -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[];
......
......@@ -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 {
......
......@@ -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': [
......
include_rules = [
"+chrome/app/breakpad_win.h",
"+components/nacl",
"+content/public/app/startup_helper_win.h",
"+sandbox/linux/seccomp-bpf",
"+sandbox/linux/services",
......
......@@ -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"
......
......@@ -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"
......
......@@ -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.
......
......@@ -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(
......
......@@ -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(
......
bradchen@chromium.org
bradnelson@chromium.org
jvoung@chromium.org
mseaborn@chromium.org
noelallen@chromium.org
sehr@chromium.org
// 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
// 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_
# 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',
},
},
},
],
}],
],
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment