summaryrefslogtreecommitdiffstats
path: root/chrome/service/cloud_print/cloud_print_proxy.cc
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 23:19:33 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 23:19:33 +0000
commit0ffeb598304f119e2d3df70d47a592d2dbc722da (patch)
tree8d1519e141a036af64cb4c943b1132060503a24f /chrome/service/cloud_print/cloud_print_proxy.cc
parent9fc18674a68e4b4c366ffb81fb4c84b6c6bed9d2 (diff)
downloadchromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.zip
chromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.tar.gz
chromium_src-0ffeb598304f119e2d3df70d47a592d2dbc722da.tar.bz2
Code to send diagnostic messages about cloud print proxy. Currently diagnostic messages are sent if the print system fails to initialize (this can happen on Windows if the XPS Framework is not installed on XP) as well when printer registration fails because we could not get the capabilities for the printer.
BUG=None TEST=None Review URL: http://codereview.chromium.org/6245005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72037 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/cloud_print/cloud_print_proxy.cc')
-rw-r--r--chrome/service/cloud_print/cloud_print_proxy.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/service/cloud_print/cloud_print_proxy.cc b/chrome/service/cloud_print/cloud_print_proxy.cc
index 9bb789d..8f925a1 100644
--- a/chrome/service/cloud_print/cloud_print_proxy.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy.cc
@@ -106,7 +106,7 @@ void CloudPrintProxy::EnableForUser(const std::string& lsid) {
cloud_print_email_, proxy_id);
}
if (client_) {
- client_->OnCloudPrintProxyEnabled();
+ client_->OnCloudPrintProxyEnabled(true);
}
}
@@ -115,7 +115,7 @@ void CloudPrintProxy::DisableForUser() {
cloud_print_email_.clear();
Shutdown();
if (client_) {
- client_->OnCloudPrintProxyDisabled();
+ client_->OnCloudPrintProxyDisabled(true);
}
}
@@ -161,6 +161,15 @@ void CloudPrintProxy::OnAuthenticationFailed() {
FROM_HERE, NewRunnableFunction(&ShowTokenExpiredNotificationInBrowser));
}
+void CloudPrintProxy::OnPrintSystemUnavailable() {
+ // If the print system is unavailable, we want to shutdown the proxy and
+ // disable it non-persistently.
+ Shutdown();
+ if (client_) {
+ client_->OnCloudPrintProxyDisabled(false);
+ }
+}
+
void CloudPrintProxy::Shutdown() {
DCHECK(CalledOnValidThread());
if (backend_.get())