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

Side by Side Diff: chrome/service/service_utility_process_host.cc

Issue 785353003: Update cloud_print and chrome/service to use the new version of LaunchProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "chrome/service/service_utility_process_host.h" 5 #include "chrome/service/service_utility_process_host.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return true; 226 return true;
227 } 227 }
228 ReportUmaEvent(SERVICE_UTILITY_FAILED_TO_START); 228 ReportUmaEvent(SERVICE_UTILITY_FAILED_TO_START);
229 return false; 229 return false;
230 } 230 }
231 231
232 bool ServiceUtilityProcessHost::Launch(base::CommandLine* cmd_line, 232 bool ServiceUtilityProcessHost::Launch(base::CommandLine* cmd_line,
233 bool no_sandbox) { 233 bool no_sandbox) {
234 if (no_sandbox) { 234 if (no_sandbox) {
235 cmd_line->AppendSwitch(switches::kNoSandbox); 235 cmd_line->AppendSwitch(switches::kNoSandbox);
236 base::ProcessHandle handle; 236 process_ = base::LaunchProcess(*cmd_line, base::LaunchOptions());
237 if (base::LaunchProcess(*cmd_line, base::LaunchOptions(), &handle))
238 process_ = base::Process(handle);
239 } else { 237 } else {
240 ServiceSandboxedProcessLauncherDelegate delegate; 238 ServiceSandboxedProcessLauncherDelegate delegate;
241 process_ = content::StartSandboxedProcess(&delegate, cmd_line); 239 process_ = content::StartSandboxedProcess(&delegate, cmd_line);
242 } 240 }
243 return process_.IsValid(); 241 return process_.IsValid();
244 } 242 }
245 243
246 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) { 244 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) {
247 if (child_process_host_) 245 if (child_process_host_)
248 return child_process_host_->Send(msg); 246 return child_process_host_->Send(msg);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 return false; 418 return false;
421 } 419 }
422 printing::Emf emf; 420 printing::Emf emf;
423 if (!emf.InitFromData(data.data(), data.size())) { 421 if (!emf.InitFromData(data.data(), data.size())) {
424 OnRenderPDFPagesToMetafileDone(false); 422 OnRenderPDFPagesToMetafileDone(false);
425 return false; 423 return false;
426 } 424 }
427 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); 425 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf);
428 return true; 426 return true;
429 } 427 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy.cc ('k') | cloud_print/common/win/install_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698