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

Side by Side Diff: chrome/browser/worker_host/worker_process_host.cc

Issue 3030043: PrependWrapper is platform-specific, so it should take a platform string. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/browser/zygote_host_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/worker_host/worker_process_host.h" 5 #include "chrome/browser/worker_host/worker_process_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 138
139 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugChildren)) { 139 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDebugChildren)) {
140 // Look to pass-on the kDebugOnStart flag. 140 // Look to pass-on the kDebugOnStart flag.
141 std::string value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 141 std::string value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
142 switches::kDebugChildren); 142 switches::kDebugChildren);
143 if (value.empty() || value == switches::kWorkerProcess) { 143 if (value.empty() || value == switches::kWorkerProcess) {
144 // launches a new xterm, and runs the worker process in gdb, reading 144 // launches a new xterm, and runs the worker process in gdb, reading
145 // optional commands from gdb_chrome file in the working directory. 145 // optional commands from gdb_chrome file in the working directory.
146 cmd_line->PrependWrapper(L"xterm -e gdb -x gdb_chrome --args"); 146 cmd_line->PrependWrapper("xterm -e gdb -x gdb_chrome --args");
147 } 147 }
148 } 148 }
149 149
150 if (CommandLine::ForCurrentProcess()->HasSwitch( 150 if (CommandLine::ForCurrentProcess()->HasSwitch(
151 switches::kRendererCmdPrefix)) { 151 switches::kRendererCmdPrefix)) {
152 const std::wstring prefix = 152 cmd_line->PrependWrapper(
153 CommandLine::ForCurrentProcess()->GetSwitchValue( 153 CommandLine::ForCurrentProcess()->GetSwitchValueNative(
154 switches::kRendererCmdPrefix); 154 switches::kRendererCmdPrefix));
155 cmd_line->PrependWrapper(prefix);
156 } 155 }
157 #endif 156 #endif
158 157
159 Launch( 158 Launch(
160 #if defined(OS_WIN) 159 #if defined(OS_WIN)
161 FilePath(), 160 FilePath(),
162 #elif defined(OS_POSIX) 161 #elif defined(OS_POSIX)
163 false, 162 false,
164 base::environment_vector(), 163 base::environment_vector(),
165 #endif 164 #endif
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 597 }
599 } 598 }
600 return false; 599 return false;
601 } 600 }
602 601
603 WorkerProcessHost::WorkerInstance::SenderInfo 602 WorkerProcessHost::WorkerInstance::SenderInfo
604 WorkerProcessHost::WorkerInstance::GetSender() const { 603 WorkerProcessHost::WorkerInstance::GetSender() const {
605 DCHECK(NumSenders() == 1); 604 DCHECK(NumSenders() == 1);
606 return *senders_.begin(); 605 return *senders_.begin();
607 } 606 }
OLDNEW
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/browser/zygote_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698