summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 21:41:54 +0000
committerscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-24 21:41:54 +0000
commite39027a75394d6d05a13f4af83b91482324ee071 (patch)
tree80fb967bf9cf308ff037e6548c10d5ea29937934 /chrome/browser/ui
parent31fee93b27ac349b77072117b359aa3604eed899 (diff)
downloadchromium_src-e39027a75394d6d05a13f4af83b91482324ee071.zip
chromium_src-e39027a75394d6d05a13f4af83b91482324ee071.tar.gz
chromium_src-e39027a75394d6d05a13f4af83b91482324ee071.tar.bz2
Modify chrome to accept a pdf file on the command line and upload it to Cloud Print via the Cloud Print dialog
Contributed by abodenha@google.com BUG=none TEST=Run Chrome on Windows with --cloud-print-file=<Path to PDF> and --cloud-print-job-title Review URL: http://codereview.chromium.org/6038008 Patch from Albert Bodenhamer <abodenha@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/browser_init.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index e96fea5..c911f90 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1124,6 +1124,12 @@ bool BrowserInit::ProcessCmdLineImpl(const CommandLine& command_line,
silent_launch = true;
profile->GetCloudPrintProxyService()->ShowTokenExpiredNotification();
}
+ // If we are just displaying a print dialog we shouldn't open browser
+ // windows.
+ if (!command_line.GetSwitchValuePath(switches::kCloudPrintFile).empty()) {
+ silent_launch = true;
+ }
+
if (command_line.HasSwitch(switches::kExplicitlyAllowedPorts)) {
std::string allowed_ports =