summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/nacl_process_host.cc13
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc5
-rw-r--r--chrome/common/chrome_switches.cc9
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/nacl/nacl_main.cc53
5 files changed, 18 insertions, 64 deletions
diff --git a/chrome/browser/nacl_process_host.cc b/chrome/browser/nacl_process_host.cc
index 53af990..da40335 100644
--- a/chrome/browser/nacl_process_host.cc
+++ b/chrome/browser/nacl_process_host.cc
@@ -94,22 +94,13 @@ bool NaClProcessHost::LaunchSelLdr() {
switches::kEnableDCHECK,
switches::kSilentDumpOnDCHECK,
switches::kMemoryProfiling,
- switches::kEnableNaCl,
};
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
-
-#if defined(OS_MACOSX)
-// TODO(dspringer): NaCl is temporalrily disabled on the Mac by default, but it
-// can be enabled with the --enable-nacl cmd-line switch. Remove this check
-// when the security issues in the Mac PIC code are resolved.
- if (!browser_command_line.HasSwitch(switches::kEnableNaCl))
- return false;
-#endif
-
for (size_t i = 0; i < arraysize(switch_names); ++i) {
if (browser_command_line.HasSwitch(switch_names[i])) {
- cmd_line->AppendSwitchWithValue(switch_names[i],
+ cmd_line->AppendSwitchWithValue(
+ switch_names[i],
browser_command_line.GetSwitchValueASCII(switch_names[i]));
}
}
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 5ff39e9..6a79b40 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -495,10 +495,9 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer(
switches::kTestSandbox,
switches::kEnableSeccompSandbox,
#if !defined (GOOGLE_CHROME_BUILD)
- // These are unsupported and not fully tested modes, so don't enable them
- // for official Google Chrome builds.
+ // This is an unsupported and not fully tested mode, so don't enable it for
+ // official Chrome builds.
switches::kInProcessPlugins,
- switches::kEnableNaCl,
#endif
switches::kDomAutomationController,
switches::kUserAgent,
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index fb31f69..b2fbbaf 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -222,12 +222,6 @@ const char kEnableLogging[] = "enable-logging";
// assumed to be sRGB.
const char kEnableMonitorProfile[] = "enable-monitor-profile";
-// Enables launching of Native Client processes.
-// TODO(dspringer): NaCl is disabled on the Mac by default until the
-// NaClSyscallSeg relocatable code can be made secure. Use this switch to
-// enable NaCl loading on the Mac for development.
-const char kEnableNaCl[] = "enable-nacl";
-
// Enable Native Web Worker support.
const char kEnableNativeWebWorkers[] = "enable-native-web-workers";
@@ -383,9 +377,6 @@ const char kMetricsRecordingOnly[] = "metrics-recording-only";
// Causes the process to run as a NativeClient's sel_ldr subprocess.
const char kNaClProcess[] = "nacl";
-// Causes the Native Client process to display a dialog on launch.
-const char kNaClStartupDialog[] = "nacl-startup-dialog";
-
// Allows the new tab page resource to be loaded from a local HTML file. This
// should be a path to the HTML file that you want to use for the new tab page.
// It is used for manually testing new versions of the new tab page only,
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 53f4587..7a4ac89 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -80,7 +80,6 @@ extern const char kDisableLocalStorage[];
extern const char kEnableLogging[];
extern const char kEnableMonitorProfile[];
extern const char kEnableNativeWebWorkers[];
-extern const char kEnableNaCl[];
extern const char kEnableNewAutoFill[];
extern const char kEnablePrivacyBlacklists[];
extern const char kEnableRendererAccessibility[];
@@ -118,7 +117,6 @@ extern const char kMemoryProfiling[];
extern const char kMessageLoopHistogrammer[];
extern const char kMetricsRecordingOnly[];
extern const char kNaClProcess[];
-extern const char kNaClStartupDialog[];
extern const char kNewTabPage[];
extern const char kNoDefaultBrowserCheck[];
extern const char kNoEvents[];
diff --git a/chrome/nacl/nacl_main.cc b/chrome/nacl/nacl_main.cc
index 255b2ce..5271cf4 100644
--- a/chrome/nacl/nacl_main.cc
+++ b/chrome/nacl/nacl_main.cc
@@ -22,42 +22,8 @@
#include "chrome/common/main_function_params.h"
#include "chrome/nacl/nacl_thread.h"
-// This function provides some ways to test crash and assertion handling
-// behavior of the renderer.
-static void HandleNaClTestParameters(const CommandLine& command_line) {
- if (command_line.HasSwitch(switches::kNaClStartupDialog)) {
- ChildProcess::WaitForDebugger(L"NativeClient");
- }
-}
-
-// Launch the NaCl child process in its own thread.
-#if defined (OS_WIN)
-static void LaunchNaClChildProcess(bool no_sandbox,
- sandbox::TargetServices* target_services) {
- ChildProcess nacl_process;
- nacl_process.set_main_thread(new NaClThread());
- if (!no_sandbox && target_services)
- target_services->LowerToken();
- MessageLoop::current()->Run();
-}
-#else
-static void LaunchNaClChildProcess() {
- ChildProcess nacl_process;
- nacl_process.set_main_thread(new NaClThread());
- MessageLoop::current()->Run();
-}
-#endif
-
// main() routine for running as the sel_ldr process.
int NaClMain(const MainFunctionParams& parameters) {
- const CommandLine& parsed_command_line = parameters.command_line_;
-
- // This function allows pausing execution using the --nacl-startup-dialog
- // flag allowing us to attach a debugger.
- // Do not move this function down since that would mean we can't easily debug
- // whatever occurs before it.
- HandleNaClTestParameters(parsed_command_line);
-
// The main thread of the plugin services IO.
MessageLoopForIO main_message_loop;
std::wstring app_name = chrome::kBrowserAppName;
@@ -67,6 +33,8 @@ int NaClMain(const MainFunctionParams& parameters) {
HighResolutionTimerManager hi_res_timer_manager;
#if defined(OS_WIN)
+ const CommandLine& parsed_command_line = parameters.command_line_;
+
sandbox::TargetServices* target_services =
parameters.sandbox_info_.TargetServices();
@@ -84,15 +52,22 @@ int NaClMain(const MainFunctionParams& parameters) {
DCHECK(sandbox_test_module);
}
}
- LaunchNaClChildProcess(no_sandbox, target_services);
-
-#elif defined(OS_MACOSX)
- LaunchNaClChildProcess();
#else
- NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";
+ NOTIMPLEMENTED() << " non-windows startup, plugin startup dialog etc.";
#endif
+ {
+ ChildProcess nacl_process;
+ nacl_process.set_main_thread(new NaClThread());
+#if defined(OS_WIN)
+ if (!no_sandbox && target_services)
+ target_services->LowerToken();
+#endif
+
+ MessageLoop::current()->Run();
+ }
+
return 0;
}