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

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

Issue 637023002: Misc. cleanup, primarily removing unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove macros.h change Created 6 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 "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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 ReportUmaEvent(SERVICE_UTILITY_STARTED); 225 ReportUmaEvent(SERVICE_UTILITY_STARTED);
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 base::ProcessHandle process = base::kNullProcessHandle;
236 cmd_line->AppendSwitch(switches::kNoSandbox); 235 cmd_line->AppendSwitch(switches::kNoSandbox);
237 base::LaunchProcess(*cmd_line, base::LaunchOptions(), &handle_); 236 base::LaunchProcess(*cmd_line, base::LaunchOptions(), &handle_);
238 } else { 237 } else {
239 ServiceSandboxedProcessLauncherDelegate delegate; 238 ServiceSandboxedProcessLauncherDelegate delegate;
240 handle_ = content::StartSandboxedProcess(&delegate, cmd_line); 239 handle_ = content::StartSandboxedProcess(&delegate, cmd_line);
241 } 240 }
242 return (handle_ != base::kNullProcessHandle); 241 return (handle_ != base::kNullProcessHandle);
243 } 242 }
244 243
245 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) { 244 bool ServiceUtilityProcessHost::Send(IPC::Message* msg) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 return false; 421 return false;
423 } 422 }
424 printing::Emf emf; 423 printing::Emf emf;
425 if (!emf.InitFromData(data.data(), data.size())) { 424 if (!emf.InitFromData(data.data(), data.size())) {
426 OnRenderPDFPagesToMetafileDone(false); 425 OnRenderPDFPagesToMetafileDone(false);
427 return false; 426 return false;
428 } 427 }
429 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf); 428 OnRenderPDFPagesToMetafilePageDone(scale_factor, emf);
430 return true; 429 return true;
431 } 430 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698