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

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

Issue 7715022: Print Preview: Provide a link to try printing with the system dialog when print preview fails. Al... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 97902)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -75,6 +75,7 @@
PREVIEW_FAILED,
PREVIEW_STARTED,
INITIATOR_TAB_CRASHED,
+ INITIATOR_TAB_CLOSED,
USERACTION_BUCKET_BOUNDARY
};
@@ -494,11 +495,8 @@
TabContents* initiator_tab = GetInitiatorTab();
if (!initiator_tab) {
- if (!reported_failed_preview_) {
- ReportUserActionHistogram(PREVIEW_FAILED);
- reported_failed_preview_ = true;
- }
- print_preview_ui->OnPrintPreviewFailed();
+ ReportUserActionHistogram(INITIATOR_TAB_CLOSED);
+ print_preview_ui->OnInitiatorTabClosed();
return;
}
@@ -884,6 +882,13 @@
wrapper->print_view_manager()->set_observer(NULL);
}
+void PrintPreviewHandler::OnPrintPreviewFailed() {
+ if (reported_failed_preview_)
+ return;
+ reported_failed_preview_ = true;
+ ReportUserActionHistogram(PREVIEW_FAILED);
+}
+
void PrintPreviewHandler::FileSelected(const FilePath& path,
int index, void* params) {
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(web_ui_);

Powered by Google App Engine
This is Rietveld 408576698