OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/nacl_process_host.h" | 7 #include "chrome/browser/nacl_process_host.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <fcntl.h> | 10 #include <fcntl.h> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 bool NaClProcessHost::LaunchSelLdr(ResourceMessageFilter* renderer_msg_filter, | 111 bool NaClProcessHost::LaunchSelLdr(ResourceMessageFilter* renderer_msg_filter, |
112 const int descriptor, | 112 const int descriptor, |
113 const nacl::Handle imc_handle) { | 113 const nacl::Handle imc_handle) { |
114 if (!CreateChannel()) | 114 if (!CreateChannel()) |
115 return false; | 115 return false; |
116 | 116 |
117 // Build command line for nacl. | 117 // Build command line for nacl. |
118 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 118 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
119 std::wstring exe_path = | 119 FilePath exe_path = |
120 browser_command_line.GetSwitchValue(switches::kBrowserSubprocessPath); | 120 browser_command_line.GetSwitchValuePath(switches::kBrowserSubprocessPath); |
121 if (exe_path.empty() && !PathService::Get(base::FILE_EXE, &exe_path)) | 121 if (exe_path.empty() && !PathService::Get(base::FILE_EXE, &exe_path)) |
122 return false; | 122 return false; |
123 | 123 |
124 CommandLine cmd_line(exe_path); | 124 CommandLine cmd_line(exe_path); |
125 if (logging::DialogsAreSuppressed()) | 125 if (logging::DialogsAreSuppressed()) |
126 cmd_line.AppendSwitch(switches::kNoErrorDialogs); | 126 cmd_line.AppendSwitch(switches::kNoErrorDialogs); |
127 | 127 |
128 // propagate the following switches to the plugin command line (along with | 128 // Propagate the following switches to the plugin command line (along with |
129 // any associated values) if present in the browser command line | 129 // any associated values) if present in the browser command line. |
130 // TODO(gregoryd): check which flags of those below can be supported. | 130 // TODO(gregoryd): check which flags of those below can be supported. |
131 static const char* const switch_names[] = { | 131 static const char* const switch_names[] = { |
132 switches::kNoSandbox, | 132 switches::kNoSandbox, |
133 switches::kTestSandbox, | 133 switches::kTestSandbox, |
134 switches::kDisableBreakpad, | 134 switches::kDisableBreakpad, |
135 switches::kFullMemoryCrashReport, | 135 switches::kFullMemoryCrashReport, |
136 switches::kEnableLogging, | 136 switches::kEnableLogging, |
137 switches::kDisableLogging, | 137 switches::kDisableLogging, |
138 switches::kLoggingLevel, | 138 switches::kLoggingLevel, |
139 switches::kEnableDCHECK, | 139 switches::kEnableDCHECK, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 void NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 204 void NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
205 NOTREACHED() << "Invalid message with type = " << msg.type(); | 205 NOTREACHED() << "Invalid message with type = " << msg.type(); |
206 } | 206 } |
207 | 207 |
208 URLRequestContext* NaClProcessHost::GetRequestContext( | 208 URLRequestContext* NaClProcessHost::GetRequestContext( |
209 uint32 request_id, | 209 uint32 request_id, |
210 const ViewHostMsg_Resource_Request& request_data) { | 210 const ViewHostMsg_Resource_Request& request_data) { |
211 return NULL; | 211 return NULL; |
212 } | 212 } |
OLD | NEW |