diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 19:22:20 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-22 19:22:20 +0000 |
commit | c5c21adfa50ad97006816b096170b1a2b8a764c2 (patch) | |
tree | 6e24db20b34a39f68b18e35efe8e8b069b9a23c4 /chrome/browser/browser_init.cc | |
parent | 15d98c4bb4f51f4024210fdf185898fc6a985ef9 (diff) | |
download | chromium_src-c5c21adfa50ad97006816b096170b1a2b8a764c2.zip chromium_src-c5c21adfa50ad97006816b096170b1a2b8a764c2.tar.gz chromium_src-c5c21adfa50ad97006816b096170b1a2b8a764c2.tar.bz2 |
Added code in the browser process to display a Cloud Print token expired desktop notification. Also added a command-line switch to show this UI.
BUG=None
TEST=None for now.
Review URL: http://codereview.chromium.org/3436019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r-- | chrome/browser/browser_init.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 9dec740..f7f01a4 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -35,6 +35,7 @@ #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/prefs/session_startup_pref.h" +#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/search_engines/template_url.h" @@ -1042,6 +1043,13 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line, } } + // If we have been invoked to display a desktop notification on behalf of + // the service process, we do not want to open any browser windows. + if (command_line.HasSwitch(switches::kNotifyCloudPrintTokenExpired)) { + silent_launch = true; + profile->GetCloudPrintProxyService()->ShowTokenExpiredNotification(); + } + if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) { std::string allowed_ports = command_line.GetSwitchValueASCII(switches::kExplicitlyAllowedPorts); |