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

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

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mostly test cleanup. Created 6 years, 11 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 IPC_MESSAGE_HANDLER( 199 IPC_MESSAGE_HANDLER(
200 ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded, 200 ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
201 OnGetPrinterCapsAndDefaultsSucceeded) 201 OnGetPrinterCapsAndDefaultsSucceeded)
202 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, 202 IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
203 OnGetPrinterCapsAndDefaultsFailed) 203 OnGetPrinterCapsAndDefaultsFailed)
204 IPC_MESSAGE_UNHANDLED(handled = false) 204 IPC_MESSAGE_UNHANDLED(handled = false)
205 IPC_END_MESSAGE_MAP() 205 IPC_END_MESSAGE_MAP()
206 return handled; 206 return handled;
207 } 207 }
208 208
209 base::ProcessHandle ServiceUtilityProcessHost::GetHandle() const {
210 return handle_;
211 }
212
209 void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded( 213 void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded(
210 int highest_rendered_page_number, 214 int highest_rendered_page_number,
211 double scale_factor) { 215 double scale_factor) {
212 DCHECK(waiting_for_reply_); 216 DCHECK(waiting_for_reply_);
213 waiting_for_reply_ = false; 217 waiting_for_reply_ = false;
214 // If the metafile was successfully created, we need to take our hands off the 218 // If the metafile was successfully created, we need to take our hands off the
215 // scratch metafile directory. The client will delete it when it is done with 219 // scratch metafile directory. The client will delete it when it is done with
216 // metafile. 220 // metafile.
217 scratch_metafile_dir_->Take(); 221 scratch_metafile_dir_->Take();
218 client_message_loop_proxy_->PostTask( 222 client_message_loop_proxy_->PostTask(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 if (!metafile.InitFromFile(metafile_path)) { 271 if (!metafile.InitFromFile(metafile_path)) {
268 OnRenderPDFPagesToMetafileFailed(); 272 OnRenderPDFPagesToMetafileFailed();
269 } else { 273 } else {
270 OnRenderPDFPagesToMetafileSucceeded(metafile, 274 OnRenderPDFPagesToMetafileSucceeded(metafile,
271 highest_rendered_page_number, 275 highest_rendered_page_number,
272 scale_factor); 276 scale_factor);
273 } 277 }
274 #endif // defined(OS_WIN) 278 #endif // defined(OS_WIN)
275 } 279 }
276 280
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698