| 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_);
|
|
|