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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_ui.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
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
index d765bf1519b43a5104b248c85755b6db8bd81aef..e4525b912c0bd2a02258f95958d113c048595382 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -17,11 +17,6 @@
#include "ui/base/webui/web_ui_util.h"
SyncConfirmationUI::SyncConfirmationUI(content::WebUI* web_ui)
- : SyncConfirmationUI(web_ui, base::MakeUnique<SyncConfirmationHandler>()) {}
-
-SyncConfirmationUI::SyncConfirmationUI(
- content::WebUI* web_ui,
- std::unique_ptr<SyncConfirmationHandler> handler)
: WebDialogUI(web_ui) {
Profile* profile = Profile::FromWebUI(web_ui);
bool is_sync_allowed = profile->IsSyncAllowed();
@@ -67,5 +62,9 @@ SyncConfirmationUI::SyncConfirmationUI(
source->AddLocalizedStrings(strings);
content::WebUIDataSource::Add(profile, source);
- web_ui->AddMessageHandler(std::move(handler));
+}
+
+void SyncConfirmationUI::InitializeMessageHandlerWithBrowser(Browser* browser) {
+ web_ui()->AddMessageHandler(
+ base::MakeUnique<SyncConfirmationHandler>(browser));
}
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698