summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc24
-rw-r--r--chrome/browser/printing/print_dialog_cloud.h3
-rw-r--r--chrome/browser/printing/print_dialog_cloud_internal.h3
-rw-r--r--chrome/browser/printing/printing_message_filter.cc3
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc13
7 files changed, 13 insertions, 38 deletions
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 5b67d69..91a0558 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -651,8 +651,7 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context,
const base::FilePath& path_to_file,
const base::string16& print_job_title,
const base::string16& print_ticket,
- const std::string& file_type,
- bool delete_on_close) {
+ const std::string& file_type) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_refptr<base::RefCountedMemory> data;
int64 file_size = 0;
@@ -673,8 +672,7 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context,
base::Bind(&print_dialog_cloud::CreatePrintDialogForBytes,
browser_context, modal_parent, data, print_job_title,
print_ticket, file_type));
- if (delete_on_close)
- base::DeleteFile(path_to_file, false);
+ base::DeleteFile(path_to_file, false);
}
} // namespace internal_cloud_print_helpers
@@ -700,15 +698,14 @@ void CreatePrintDialogForFile(content::BrowserContext* browser_context,
const base::FilePath& path_to_file,
const base::string16& print_job_title,
const base::string16& print_ticket,
- const std::string& file_type,
- bool delete_on_close) {
+ const std::string& file_type) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE) ||
BrowserThread::CurrentlyOn(BrowserThread::UI));
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
base::Bind(&internal_cloud_print_helpers::CreateDialogForFileImpl,
browser_context, modal_parent, path_to_file, print_job_title,
- print_ticket, file_type, delete_on_close));
+ print_ticket, file_type));
}
void CreateCloudPrintSigninTab(Browser* browser,
@@ -761,17 +758,8 @@ bool CreatePrintDialogFromCommandLine(Profile* profile,
switches::kCloudPrintFileType);
}
- bool delete_on_close = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kCloudPrintDeleteFile);
-
- print_dialog_cloud::CreatePrintDialogForFile(
- profile,
- NULL,
- cloud_print_file,
- print_job_title,
- print_job_print_ticket,
- file_type,
- delete_on_close);
+ print_dialog_cloud::CreatePrintDialogForFile(profile, NULL,
+ cloud_print_file, print_job_title, print_job_print_ticket, file_type);
return true;
}
}
diff --git a/chrome/browser/printing/print_dialog_cloud.h b/chrome/browser/printing/print_dialog_cloud.h
index 9fbf2c8..9507903 100644
--- a/chrome/browser/printing/print_dialog_cloud.h
+++ b/chrome/browser/printing/print_dialog_cloud.h
@@ -43,8 +43,7 @@ void CreatePrintDialogForFile(content::BrowserContext* browser_context,
const base::FilePath& path_to_file,
const base::string16& print_job_title,
const base::string16& print_ticket,
- const std::string& file_type,
- bool delete_on_close);
+ const std::string& file_type);
// Creates a print dialog to print data in RAM.
// Called on the FILE or UI thread. Even though this may start up a modal
diff --git a/chrome/browser/printing/print_dialog_cloud_internal.h b/chrome/browser/printing/print_dialog_cloud_internal.h
index b344099..d33ba05 100644
--- a/chrome/browser/printing/print_dialog_cloud_internal.h
+++ b/chrome/browser/printing/print_dialog_cloud_internal.h
@@ -194,8 +194,7 @@ void CreateDialogForFileImpl(content::BrowserContext* browser_context,
const base::FilePath& path_to_file,
const base::string16& print_job_title,
const base::string16& print_ticket,
- const std::string& file_type,
- bool delete_on_close);
+ const std::string& file_type);
} // namespace internal_cloud_print_helpers
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 6911cd3..f9fb3ee 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -246,8 +246,7 @@ void PrintingMessageFilter::CreatePrintDialogForFile(
path,
wc->GetTitle(),
base::string16(),
- std::string("application/pdf"),
- false);
+ std::string("application/pdf"));
}
#endif // defined(OS_CHROMEOS)
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 76164d1..48ac443 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -163,10 +163,6 @@ const char kCipherSuiteBlacklist[] = "cipher-suite-blacklist";
// expiration of credentials during testing.
const char kClearTokenService[] = "clear-token-service";
-// Used with kCloudPrintFile. Tells Chrome to delete the file when finished
-// displaying the print dialog.
-const char kCloudPrintDeleteFile[] = "cloud-print-delete-file";
-
// Tells chrome to display the cloud print dialog and upload the specified file
// for printing.
const char kCloudPrintFile[] = "cloud-print-file";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index a9fa735..78091a2 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -59,7 +59,6 @@ extern const char kCheckForUpdateIntervalSec[];
extern const char kCheckCloudPrintConnectorPolicy[];
extern const char kCipherSuiteBlacklist[];
extern const char kClearTokenService[];
-extern const char kCloudPrintDeleteFile[];
extern const char kCloudPrintFile[];
extern const char kCloudPrintJobTitle[];
extern const char kCloudPrintFileType[];
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index a905be1..bfd7bdc 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -213,17 +213,12 @@ bool LaunchPrintDialog(const base::FilePath& xps_path,
CommandLine command_line(chrome_path);
base::FilePath chrome_profile = GetChromeProfilePath();
- if (!chrome_profile.empty()) {
+ if (!chrome_profile.empty())
command_line.AppendSwitchPath(switches::kUserDataDir, chrome_profile);
- }
- command_line.AppendSwitchPath(switches::kCloudPrintFile,
- xps_path);
- command_line.AppendSwitchNative(switches::kCloudPrintFileType,
- kXpsMimeType);
- command_line.AppendSwitchNative(switches::kCloudPrintJobTitle,
- job_title);
- command_line.AppendSwitch(switches::kCloudPrintDeleteFile);
+ command_line.AppendSwitchPath(switches::kCloudPrintFile, xps_path);
+ command_line.AppendSwitchNative(switches::kCloudPrintFileType, kXpsMimeType);
+ command_line.AppendSwitchNative(switches::kCloudPrintJobTitle, job_title);
base::LaunchOptions options;
options.as_user = primary_token_scoped;
base::LaunchProcess(command_line, options, NULL);