summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorabodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 21:02:39 +0000
committerabodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 21:02:39 +0000
commit65c9d89a68c9fa8fa0274aa16c5cca479ca44387 (patch)
treeb579366926c0ebfd838890dcbf38c5a3f20587a9 /chrome/browser/browser_main.cc
parent33104a61421827beeb318612afe92c1cf673b6ec (diff)
downloadchromium_src-65c9d89a68c9fa8fa0274aa16c5cca479ca44387.zip
chromium_src-65c9d89a68c9fa8fa0274aa16c5cca479ca44387.tar.gz
chromium_src-65c9d89a68c9fa8fa0274aa16c5cca479ca44387.tar.bz2
Launch print dialog from BrowserInit::ProcessCmdLineImpl rather than BrowserMain. This allows the print dialog to work even if chrome is already running.
BUG= TEST=Run Chrome.exe normally then run a second copy with --cloud-print-file="<some valid file>" Also, run chrome.exe with --cloud-print-file with no other chrome.exe running. In both cases, the print dialog should display. Review URL: http://codereview.chromium.org/6833012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index a6541b2..686b08c 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -61,7 +61,6 @@
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
-#include "chrome/browser/printing/print_dialog_cloud.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -1723,34 +1722,6 @@ int BrowserMain(const MainFunctionParams& parameters) {
control->Launch(NULL, NULL);
}
}
- if (parsed_command_line.HasSwitch(switches::kCloudPrintFile)) {
- FilePath cloud_print_file;
- cloud_print_file =
- parsed_command_line.GetSwitchValuePath(switches::kCloudPrintFile);
- if (!cloud_print_file.empty()) {
- string16 print_job_title;
- if (parsed_command_line.HasSwitch(switches::kCloudPrintJobTitle)) {
-#ifdef OS_WIN
- CommandLine::StringType native_job_title;
- native_job_title = CommandLine::ForCurrentProcess()->GetSwitchValueNative(
- switches::kCloudPrintJobTitle);
- print_job_title = string16(native_job_title);
-#elif defined(OS_POSIX)
- // TODO(abodenha@chromium.org) Implement this for OS_POSIX
- // Command line string types are different
-#endif
- }
- std::string file_type = "application/pdf";
- if (parsed_command_line.HasSwitch(switches::kCloudPrintFileType)) {
- file_type = parsed_command_line.GetSwitchValueASCII(
- switches::kCloudPrintFileType);
- }
- print_dialog_cloud::CreatePrintDialogForFile(cloud_print_file,
- print_job_title,
- file_type,
- false);
- }
- }
#if defined(OS_CHROMEOS)
// Run the Out of Memory priority manager while in this scope. Wait