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

Side by Side Diff: content/browser/utility_process_host_impl.cc

Issue 2226403002: Remove Channel token from InProcessChildThreadParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moar-channels
Patch Set: . Created 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/utility_process_host_impl.h" 5 #include "content/browser/utility_process_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 process_->GetHost()->CreateChannelMojo(); 258 process_->GetHost()->CreateChannelMojo();
259 259
260 if (RenderProcessHost::run_renderer_in_process()) { 260 if (RenderProcessHost::run_renderer_in_process()) {
261 DCHECK(g_utility_main_thread_factory); 261 DCHECK(g_utility_main_thread_factory);
262 // See comment in RenderProcessHostImpl::Init() for the background on why we 262 // See comment in RenderProcessHostImpl::Init() for the background on why we
263 // support single process mode this way. 263 // support single process mode this way.
264 in_process_thread_.reset( 264 in_process_thread_.reset(
265 g_utility_main_thread_factory(InProcessChildThreadParams( 265 g_utility_main_thread_factory(InProcessChildThreadParams(
266 std::string(), BrowserThread::UnsafeGetMessageLoopForThread( 266 std::string(), BrowserThread::UnsafeGetMessageLoopForThread(
267 BrowserThread::IO)->task_runner(), 267 BrowserThread::IO)->task_runner(),
268 std::string(),
269 process_->child_connection()->service_token()))); 268 process_->child_connection()->service_token())));
270 in_process_thread_->Start(); 269 in_process_thread_->Start();
271 } else { 270 } else {
272 const base::CommandLine& browser_command_line = 271 const base::CommandLine& browser_command_line =
273 *base::CommandLine::ForCurrentProcess(); 272 *base::CommandLine::ForCurrentProcess();
274 273
275 bool has_cmd_prefix = browser_command_line.HasSwitch( 274 bool has_cmd_prefix = browser_command_line.HasSwitch(
276 switches::kUtilityCmdPrefix); 275 switches::kUtilityCmdPrefix);
277 276
278 #if defined(OS_ANDROID) 277 #if defined(OS_ANDROID)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 base::WeakPtr<UtilityProcessHostImpl> host, 401 base::WeakPtr<UtilityProcessHostImpl> host,
403 int error_code) { 402 int error_code) {
404 if (!host) 403 if (!host)
405 return; 404 return;
406 405
407 host->OnProcessLaunchFailed(error_code); 406 host->OnProcessLaunchFailed(error_code);
408 delete host.get(); 407 delete host.get();
409 } 408 }
410 409
411 } // namespace content 410 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698