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

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

Issue 2365273004: Initial implementation for sharing field trial state (win) (Closed)
Patch Set: rebase + gclient sync Created 4 years, 2 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 cmd_line->AppendSwitchPath(switches::kUtilityProcessAllowedDir, 333 cmd_line->AppendSwitchPath(switches::kUtilityProcessAllowedDir,
334 exposed_dir_); 334 exposed_dir_);
335 } 335 }
336 336
337 #if defined(OS_WIN) 337 #if defined(OS_WIN)
338 // Let the utility process know if it is intended to be elevated. 338 // Let the utility process know if it is intended to be elevated.
339 if (run_elevated_) 339 if (run_elevated_)
340 cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated); 340 cmd_line->AppendSwitch(switches::kUtilityProcessRunningElevated);
341 #endif 341 #endif
342 342
343 process_->Launch( 343 process_->Launch(new UtilitySandboxedProcessLauncherDelegate(
344 new UtilitySandboxedProcessLauncherDelegate(exposed_dir_, 344 exposed_dir_, run_elevated_, no_sandbox_, env_,
345 run_elevated_, 345 process_->GetHost()),
346 no_sandbox_, env_, 346 cmd_line, nullptr, true);
347 process_->GetHost()),
348 cmd_line,
349 true);
350 } 347 }
351 348
352 return true; 349 return true;
353 } 350 }
354 351
355 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) { 352 bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) {
356 if (!client_.get()) 353 if (!client_.get())
357 return true; 354 return true;
358 355
359 client_task_runner_->PostTask( 356 client_task_runner_->PostTask(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 base::WeakPtr<UtilityProcessHostImpl> host, 397 base::WeakPtr<UtilityProcessHostImpl> host,
401 int error_code) { 398 int error_code) {
402 if (!host) 399 if (!host)
403 return; 400 return;
404 401
405 host->OnProcessLaunchFailed(error_code); 402 host->OnProcessLaunchFailed(error_code);
406 delete host.get(); 403 delete host.get();
407 } 404 }
408 405
409 } // namespace content 406 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698