Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_host/nacl_process_host.h" 7 #include "chrome/browser/nacl_host/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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 FilePath exe_path = GetChildPath(true); 127 FilePath exe_path = GetChildPath(true);
128 if (exe_path.empty()) 128 if (exe_path.empty())
129 return false; 129 return false;
130 130
131 CommandLine* cmd_line = new CommandLine(exe_path); 131 CommandLine* cmd_line = new CommandLine(exe_path);
132 nacl::CopyNaClCommandLineArguments(cmd_line); 132 nacl::CopyNaClCommandLineArguments(cmd_line);
133 133
134 cmd_line->AppendSwitchWithValue(switches::kProcessType, 134 cmd_line->AppendSwitchWithValue(switches::kProcessType,
135 switches::kNaClLoaderProcess); 135 switches::kNaClLoaderProcess);
136 136
137 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, 137 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
138 ASCIIToWide(channel_id()));
139 138
140 // On Windows we might need to start the broker process to launch a new loader 139 // On Windows we might need to start the broker process to launch a new loader
141 #if defined(OS_WIN) 140 #if defined(OS_WIN)
142 if (running_on_wow64_) { 141 if (running_on_wow64_) {
143 NaClBrokerService::GetInstance()->Init(resource_dispatcher_host_); 142 NaClBrokerService::GetInstance()->Init(resource_dispatcher_host_);
144 return NaClBrokerService::GetInstance()->LaunchLoader(this, 143 return NaClBrokerService::GetInstance()->LaunchLoader(this,
145 ASCIIToWide(channel_id())); 144 ASCIIToWide(channel_id()));
146 } else { 145 } else {
147 BrowserChildProcessHost::Launch(FilePath(), cmd_line); 146 BrowserChildProcessHost::Launch(FilePath(), cmd_line);
148 } 147 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (fnIsWow64Process != NULL) { 276 if (fnIsWow64Process != NULL) {
278 BOOL bIsWow64 = FALSE; 277 BOOL bIsWow64 = FALSE;
279 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { 278 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) {
280 if (bIsWow64) { 279 if (bIsWow64) {
281 running_on_wow64_ = true; 280 running_on_wow64_ = true;
282 } 281 }
283 } 282 }
284 } 283 }
285 } 284 }
286 #endif 285 #endif
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.cc ('k') | chrome/browser/net/chrome_url_request_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698