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

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

Issue 164303: Re-commit r22981 after backout at r22992 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/chrome.gyp » ('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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug_util.h" 10 #include "base/debug_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 i->renderer_process_id, i->render_view_route_id)); 81 i->renderer_process_id, i->render_view_route_id));
82 } 82 }
83 83
84 ChildProcessSecurityPolicy::GetInstance()->Remove(GetProcessId()); 84 ChildProcessSecurityPolicy::GetInstance()->Remove(GetProcessId());
85 } 85 }
86 86
87 bool WorkerProcessHost::Init() { 87 bool WorkerProcessHost::Init() {
88 if (!CreateChannel()) 88 if (!CreateChannel())
89 return false; 89 return false;
90 90
91 std::wstring exe_path; 91 std::wstring exe_path = GetChildPath();
92 if (!PathService::Get(base::FILE_EXE, &exe_path)) 92 if (exe_path.empty())
93 return false; 93 return false;
94 94
95 CommandLine cmd_line(exe_path); 95 CommandLine cmd_line(exe_path);
96 cmd_line.AppendSwitchWithValue(switches::kProcessType, 96 cmd_line.AppendSwitchWithValue(switches::kProcessType,
97 switches::kWorkerProcess); 97 switches::kWorkerProcess);
98 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, 98 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID,
99 ASCIIToWide(channel_id())); 99 ASCIIToWide(channel_id()));
100 100
101 if (CommandLine::ForCurrentProcess()->HasSwitch( 101 if (CommandLine::ForCurrentProcess()->HasSwitch(
102 switches::kEnableNativeWebWorkers)) { 102 switches::kEnableNativeWebWorkers)) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 void WorkerProcessHost::OnCancelCreateDedicatedWorker(int route_id) { 303 void WorkerProcessHost::OnCancelCreateDedicatedWorker(int route_id) {
304 WorkerService::GetInstance()->CancelCreateDedicatedWorker( 304 WorkerService::GetInstance()->CancelCreateDedicatedWorker(
305 GetProcessId(), route_id); 305 GetProcessId(), route_id);
306 } 306 }
307 307
308 void WorkerProcessHost::OnForwardToWorker(const IPC::Message& message) { 308 void WorkerProcessHost::OnForwardToWorker(const IPC::Message& message) {
309 WorkerService::GetInstance()->ForwardMessage(message, GetProcessId()); 309 WorkerService::GetInstance()->ForwardMessage(message, GetProcessId());
310 } 310 }
OLDNEW
« no previous file with comments | « chrome/browser/utility_process_host.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698