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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc

Issue 2784823002: Reland "Use the same browser instance in the sync confirmation dialog. (Closed)
Patch Set: Rebase and fix conflicts Created 3 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
Index: chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
index 3dd0f4fccc97c53b9e9b39f18a70958d88c6d925..cc71936301330d1c9402e96559974d144be2c018 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
@@ -34,7 +34,9 @@ const double kDefaultDialogHeight = 350.0;
class TestingSyncConfirmationHandler : public SyncConfirmationHandler {
public:
- explicit TestingSyncConfirmationHandler(content::WebUI* web_ui) {
+ explicit TestingSyncConfirmationHandler(Browser* browser,
+ content::WebUI* web_ui)
+ : SyncConfirmationHandler(browser) {
set_web_ui(web_ui);
}
@@ -55,10 +57,11 @@ class SyncConfirmationHandlerTest : public BrowserWithTestWindowTest {
web_ui()->set_web_contents(
browser()->tab_strip_model()->GetActiveWebContents());
- auto handler = base::MakeUnique<TestingSyncConfirmationHandler>(web_ui());
+ auto handler =
+ base::MakeUnique<TestingSyncConfirmationHandler>(browser(), web_ui());
handler_ = handler.get();
- sync_confirmation_ui_.reset(
- new SyncConfirmationUI(web_ui(), std::move(handler)));
+ sync_confirmation_ui_.reset(new SyncConfirmationUI(web_ui()));
+ web_ui()->AddMessageHandler(std::move(handler));
// This dialog assumes the signin flow was completed, which kicks off the
// SigninManager.
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_handler.cc ('k') | chrome/browser/ui/webui/signin/sync_confirmation_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698