summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 02:41:04 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 02:41:04 +0000
commit8cad93d74811853a7fe906c4dff4746bcb228683 (patch)
tree6cc4d702989a6e6af54bd9af4232c944f2e81d90 /chrome/service
parenta83a832afa31bed2a32e21a2cd39319011deb6b9 (diff)
downloadchromium_src-8cad93d74811853a7fe906c4dff4746bcb228683.zip
chromium_src-8cad93d74811853a7fe906c4dff4746bcb228683.tar.gz
chromium_src-8cad93d74811853a7fe906c4dff4746bcb228683.tar.bz2
Remove ServiceUtilityProcessHost::Client::OnGetPrinterCapsAndDefaultsFailed.
NOTRY=true Review URL: https://codereview.chromium.org/155133002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/cloud_print/print_system_xps_win.cc22
-rw-r--r--chrome/service/service_utility_process_host.cc6
-rw-r--r--chrome/service/service_utility_process_host.h8
3 files changed, 14 insertions, 22 deletions
diff --git a/chrome/service/cloud_print/print_system_xps_win.cc b/chrome/service/cloud_print/print_system_xps_win.cc
index 5fc722d..30c04bf 100644
--- a/chrome/service/cloud_print/print_system_xps_win.cc
+++ b/chrome/service/cloud_print/print_system_xps_win.cc
@@ -428,21 +428,15 @@ class PrinterCapsHandler : public ServiceUtilityProcessHost::Client {
// ServiceUtilityProcessHost::Client implementation.
virtual void OnChildDied() OVERRIDE {
- OnGetPrinterCapsAndDefaultsFailed(printer_name_);
+ OnGetPrinterCapsAndDefaults(false, printer_name_,
+ printing::PrinterCapsAndDefaults());
}
- virtual void OnGetPrinterCapsAndDefaultsSucceeded(
+ virtual void OnGetPrinterCapsAndDefaults(
+ bool succeeded,
const std::string& printer_name,
const printing::PrinterCapsAndDefaults& caps_and_defaults) OVERRIDE {
- callback_.Run(true, printer_name, caps_and_defaults);
- callback_.Reset();
- Release();
- }
-
- virtual void OnGetPrinterCapsAndDefaultsFailed(
- const std::string& printer_name) OVERRIDE {
- printing::PrinterCapsAndDefaults caps_and_defaults;
- callback_.Run(false, printer_name, caps_and_defaults);
+ callback_.Run(succeeded, printer_name, caps_and_defaults);
callback_.Reset();
Release();
}
@@ -469,8 +463,7 @@ class PrinterCapsHandler : public ServiceUtilityProcessHost::Client {
} else {
client_message_loop_proxy->PostTask(
FROM_HERE,
- base::Bind(&PrinterCapsHandler::OnGetPrinterCapsAndDefaultsFailed,
- this, printer_name_));
+ base::Bind(&PrinterCapsHandler::OnChildDied, this));
}
}
@@ -485,14 +478,17 @@ class PrintSystemWinXPS : public PrintSystemWin {
// PrintSystem implementation.
virtual PrintSystemResult Init() OVERRIDE;
+
virtual void GetPrinterCapsAndDefaults(
const std::string& printer_name,
const PrinterCapsAndDefaultsCallback& callback) OVERRIDE;
+
virtual bool PrintSystemWinXPS::ValidatePrintTicket(
const std::string& printer_name,
const std::string& print_ticket_data) OVERRIDE;
virtual PrintSystem::JobSpooler* CreateJobSpooler() OVERRIDE;
+
virtual std::string GetSupportedMimeTypes() OVERRIDE;
private:
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 2b4e310..8825fab 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -287,7 +287,7 @@ void ServiceUtilityProcessHost::OnGetPrinterCapsAndDefaultsSucceeded(
waiting_for_reply_ = false;
client_message_loop_proxy_->PostTask(
FROM_HERE,
- base::Bind(&Client::OnGetPrinterCapsAndDefaultsSucceeded, client_.get(),
+ base::Bind(&Client::OnGetPrinterCapsAndDefaults, client_.get(), true,
printer_name, caps_and_defaults));
}
@@ -302,8 +302,8 @@ void ServiceUtilityProcessHost::OnGetPrinterCapsAndDefaultsFailed(
waiting_for_reply_ = false;
client_message_loop_proxy_->PostTask(
FROM_HERE,
- base::Bind(&Client::OnGetPrinterCapsAndDefaultsFailed, client_.get(),
- printer_name));
+ base::Bind(&Client::OnGetPrinterCapsAndDefaults, client_.get(), false,
+ printer_name, printing::PrinterCapsAndDefaults()));
}
void ServiceUtilityProcessHost::Client::MetafileAvailable(
diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h
index 1e41066..81c3051 100644
--- a/chrome/service/service_utility_process_host.h
+++ b/chrome/service/service_utility_process_host.h
@@ -62,15 +62,11 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate {
// Called when the printer capabilities and defaults have been
// retrieved successfully.
- virtual void OnGetPrinterCapsAndDefaultsSucceeded(
+ virtual void OnGetPrinterCapsAndDefaults(
+ bool succedded,
const std::string& printer_name,
const printing::PrinterCapsAndDefaults& caps_and_defaults) {}
- // Called when the printer capabilities and defaults could not be
- // retrieved successfully.
- virtual void OnGetPrinterCapsAndDefaultsFailed(
- const std::string& printer_name) {}
-
protected:
virtual ~Client() {}