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

Unified Diff: chrome/test/base/test_tab_strip_model_observer.cc

Issue 12250008: Cleanup: Remove more uses of deprecated PrintPreviewDialogController methods. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test Created 7 years, 10 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/test/base/test_tab_strip_model_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/test_tab_strip_model_observer.cc
===================================================================
--- chrome/test/base/test_tab_strip_model_observer.cc (revision 181939)
+++ chrome/test/base/test_tab_strip_model_observer.cc (working copy)
@@ -28,21 +28,21 @@
// Need to do this later - the print preview dialog has not been created yet.
MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&TestTabStripModelObserver::ObservePrintPreviewTabContents,
+ base::Bind(&TestTabStripModelObserver::ObservePrintPreviewDialog,
base::Unretained(this),
contents));
}
-void TestTabStripModelObserver::ObservePrintPreviewTabContents(
+void TestTabStripModelObserver::ObservePrintPreviewDialog(
content::WebContents* contents) {
- printing::PrintPreviewDialogController* tab_controller =
+ printing::PrintPreviewDialogController* dialog_controller =
printing::PrintPreviewDialogController::GetInstance();
- if (tab_controller) {
- content::WebContents* preview_tab =
- tab_controller->GetPrintPreviewForTab(contents);
- if (preview_tab) {
- RegisterAsObserver(content::Source<content::NavigationController>(
- &preview_tab->GetController()));
- }
- }
+ if (!dialog_controller)
+ return;
+ content::WebContents* preview_dialog =
+ dialog_controller->GetPrintPreviewForContents(contents);
+ if (!preview_dialog)
+ return;
+ RegisterAsObserver(content::Source<content::NavigationController>(
+ &preview_dialog->GetController()));
}
« no previous file with comments | « chrome/test/base/test_tab_strip_model_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698