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

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: update string message 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.h ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_handler.cc (revision 98197)
+++ chrome/browser/ui/webui/print_preview_handler.cc (working copy)
@@ -76,6 +76,7 @@
PREVIEW_FAILED,
PREVIEW_STARTED,
INITIATOR_TAB_CRASHED,
+ INITIATOR_TAB_CLOSED,
USERACTION_BUCKET_BOUNDARY
};
@@ -495,11 +496,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;
}
@@ -886,6 +884,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_);
« no previous file with comments | « chrome/browser/ui/webui/print_preview_handler.h ('k') | chrome/browser/ui/webui/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698