| Index: chrome/browser/printing/print_preview_tab_controller.cc
|
| diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
|
| index 0d94be172f689e541f0bf6fe1d5f13e7c51cd1d1..78d7fab2667d2d4092ac1dcc286c5c1790e553b1 100644
|
| --- a/chrome/browser/printing/print_preview_tab_controller.cc
|
| +++ b/chrome/browser/printing/print_preview_tab_controller.cc
|
| @@ -138,6 +138,16 @@ void PrintPreviewTabController::Observe(NotificationType type,
|
| if (initiator_tab)
|
| RemoveObservers(initiator_tab);
|
|
|
| + // |source_tab_is_preview_tab| is misleading in the case where the user
|
| + // chooses to re-open the initiator tab after closing it, as |source_tab|
|
| + // has navigated to the URL of the initiator tab at this point. Make sure to
|
| + // verify that |source_tab| really is a print preview tab.
|
| + if (IsPrintPreviewTab(source_tab)) {
|
| + PrintPreviewUI* print_preview_ui =
|
| + static_cast<PrintPreviewUI*>(source_tab->web_ui());
|
| + print_preview_ui->OnNavigation();
|
| + }
|
| +
|
| // Erase the map entry.
|
| preview_tab_map_.erase(source_tab);
|
| } else {
|
|
|