Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3592)

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 480303002: Use document from preview for System Dialog printing on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 08/19/2014 11:17:57.84 Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 558af3b036a9f4d0833d3c01038d767f8064bab9..4390512ee265233957664dd3187464d7d8a45648 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -828,8 +828,15 @@ void PrintPreviewHandler::HandlePrint(const base::ListValue* args) {
ReportUserActionHistogram(PRINT_WITH_CLOUD_PRINT);
SendCloudPrintJob(data.get());
} else {
- UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToPrinter", page_count);
- ReportUserActionHistogram(PRINT_TO_PRINTER);
+ bool system_dialog = false;
+ settings->GetBoolean(printing::kSettingShowSystemDialog, &system_dialog);
+ if (system_dialog) {
+ UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.SystemDialog", page_count);
+ ReportUserActionHistogram(FALLBACK_TO_ADVANCED_SETTINGS_DIALOG);
+ } else {
+ UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintToPrinter", page_count);
+ ReportUserActionHistogram(PRINT_TO_PRINTER);
+ }
ReportPrintSettingsStats(*settings);
// This tries to activate the initiator as well, so do not clear the
@@ -1025,8 +1032,8 @@ void PrintPreviewHandler::HandleShowSystemDialog(
print_view_manager->PrintForSystemDialogNow();
// Cancel the pending preview request if exists.
- PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- web_ui()->GetController());
+ PrintPreviewUI* print_preview_ui =
+ static_cast<PrintPreviewUI*>(web_ui()->GetController());
print_preview_ui->OnCancelPendingPreviewRequest();
}

Powered by Google App Engine
This is Rietveld 408576698