OLD | NEW |
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Succeeded, | 261 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Succeeded, |
262 OnGetPrinterSemanticCapsAndDefaultsSucceeded) | 262 OnGetPrinterSemanticCapsAndDefaultsSucceeded) |
263 IPC_MESSAGE_HANDLER( | 263 IPC_MESSAGE_HANDLER( |
264 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed, | 264 ChromeUtilityHostMsg_GetPrinterSemanticCapsAndDefaults_Failed, |
265 OnGetPrinterSemanticCapsAndDefaultsFailed) | 265 OnGetPrinterSemanticCapsAndDefaultsFailed) |
266 IPC_MESSAGE_UNHANDLED(handled = false) | 266 IPC_MESSAGE_UNHANDLED(handled = false) |
267 IPC_END_MESSAGE_MAP() | 267 IPC_END_MESSAGE_MAP() |
268 return handled; | 268 return handled; |
269 } | 269 } |
270 | 270 |
| 271 base::ProcessHandle ServiceUtilityProcessHost::GetHandle() const { |
| 272 return handle_; |
| 273 } |
| 274 |
271 void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded( | 275 void ServiceUtilityProcessHost::OnRenderPDFPagesToMetafileSucceeded( |
272 int highest_rendered_page_number, | 276 int highest_rendered_page_number, |
273 double scale_factor) { | 277 double scale_factor) { |
274 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceUtilityProcessHostEvent", | 278 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceUtilityProcessHostEvent", |
275 SERVICE_UTILITY_METAFILE_SUCCEEDED, | 279 SERVICE_UTILITY_METAFILE_SUCCEEDED, |
276 SERVICE_UTILITY_EVENT_MAX); | 280 SERVICE_UTILITY_EVENT_MAX); |
277 UMA_HISTOGRAM_TIMES("CloudPrint.ServiceUtilityMetafileTime", | 281 UMA_HISTOGRAM_TIMES("CloudPrint.ServiceUtilityMetafileTime", |
278 base::Time::Now() - start_time_); | 282 base::Time::Now() - start_time_); |
279 DCHECK(waiting_for_reply_); | 283 DCHECK(waiting_for_reply_); |
280 waiting_for_reply_ = false; | 284 waiting_for_reply_ = false; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 if (!metafile.InitFromFile(metafile_path)) { | 385 if (!metafile.InitFromFile(metafile_path)) { |
382 OnRenderPDFPagesToMetafileFailed(); | 386 OnRenderPDFPagesToMetafileFailed(); |
383 } else { | 387 } else { |
384 OnRenderPDFPagesToMetafileSucceeded(metafile, | 388 OnRenderPDFPagesToMetafileSucceeded(metafile, |
385 highest_rendered_page_number, | 389 highest_rendered_page_number, |
386 scale_factor); | 390 scale_factor); |
387 } | 391 } |
388 #endif // defined(OS_WIN) | 392 #endif // defined(OS_WIN) |
389 } | 393 } |
390 | 394 |
OLD | NEW |