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

Unified Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 9705084: Block printing from blocked popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More test fixes Created 8 years, 9 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 | « no previous file | chrome/browser/printing/print_view_manager.h » ('j') | chrome/renderer/mock_printer.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 01c6f226faedc4f60690fbfbebaebfe8fcc4db3e..5d4b1a6ac871a2c4c45514e6c5f0a57de5642bc9 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -215,7 +215,8 @@ void PrintPreviewTabController::PrintPreview(TabContentsWrapper* tab) {
PrintPreviewTabController* tab_controller = GetInstance();
if (!tab_controller)
return;
- tab_controller->GetOrCreatePreviewTab(tab);
+ if (tab_controller->GetOrCreatePreviewTab(tab) == NULL)
Lei Zhang 2012/03/19 20:19:32 nit: It's easier to just write !foo.
Albert Bodenhamer 2012/03/19 23:16:17 I have a strong preference for "== NULL" as it avo
+ tab->print_view_manager()->PrintPreviewDone();
}
TabContentsWrapper* PrintPreviewTabController::GetOrCreatePreviewTab(
« no previous file with comments | « no previous file | chrome/browser/printing/print_view_manager.h » ('j') | chrome/renderer/mock_printer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698