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

Unified Diff: chrome/browser/printing/pwg_raster_converter.cc

Issue 1885813002: Delete the utility process startup ping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused state. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/printing/pwg_raster_converter.cc
diff --git a/chrome/browser/printing/pwg_raster_converter.cc b/chrome/browser/printing/pwg_raster_converter.cc
index c457a983df2f5bb77d8a2c398f0d0a61d84acd2b..3c8a2401a3b191e897700afafe144ba8c9d482ec 100644
--- a/chrome/browser/printing/pwg_raster_converter.cc
+++ b/chrome/browser/printing/pwg_raster_converter.cc
@@ -130,7 +130,6 @@ class PwgUtilityProcessHostClient : public content::UtilityProcessHostClient {
~PwgUtilityProcessHostClient() override;
// Message handlers.
- void OnProcessStarted();
void OnSucceeded();
void OnFailed();
@@ -180,7 +179,6 @@ bool PwgUtilityProcessHostClient::OnMessageReceived(
const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PwgUtilityProcessHostClient, message)
- IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ProcessStarted, OnProcessStarted)
IPC_MESSAGE_HANDLER(
ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Succeeded, OnSucceeded)
IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_RenderPDFPagesToPWGRaster_Failed,
@@ -190,19 +188,6 @@ bool PwgUtilityProcessHostClient::OnMessageReceived(
return handled;
}
-void PwgUtilityProcessHostClient::OnProcessStarted() {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
- if (!utility_process_host_) {
- RunCallbackOnUIThread(false);
- return;
- }
-
- utility_process_host_->Send(new ChromeUtilityMsg_RenderPDFPagesToPWGRaster(
- files_->GetPdfForProcess(), settings_, bitmap_settings_,
- files_->GetPwgForProcess()));
- utility_process_host_.reset();
-}
-
void PwgUtilityProcessHostClient::OnSucceeded() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
RunCallback(true);
@@ -231,7 +216,10 @@ void PwgUtilityProcessHostClient::StartProcessOnIOThread() {
this, base::MessageLoop::current()->task_runner())->AsWeakPtr();
utility_process_host_->SetName(l10n_util::GetStringUTF16(
IDS_UTILITY_PROCESS_PWG_RASTER_CONVERTOR_NAME));
- utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
+ utility_process_host_->Send(new ChromeUtilityMsg_RenderPDFPagesToPWGRaster(
+ files_->GetPdfForProcess(), settings_, bitmap_settings_,
+ files_->GetPwgForProcess()));
+ utility_process_host_.reset();
Scott Hess - ex-Googler 2016/04/13 17:44:43 I have no idea how this code works, was just revie
Anand Mistry (off Chromium) 2016/04/13 23:42:57 Done.
}
void PwgUtilityProcessHostClient::RunCallback(bool success) {

Powered by Google App Engine
This is Rietveld 408576698