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

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

Issue 1806353002: Enhanced Sync Confirmation modal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed roger's comments Created 4 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.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
index df51a0d195a06e803804e9a1cb407d2a7358a3e3..d1c3af243da94a1727aca580c5b47a6abd48ad1e 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
+#include <vector>
+
#include "base/bind.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/signin/account_tracker_service_factory.h"
@@ -41,18 +43,26 @@ void SyncConfirmationHandler::RegisterMessages() {
}
void SyncConfirmationHandler::HandleConfirm(const base::ListValue* args) {
- CloseModalSigninWindow(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS);
+ bool open_activity_controls_url = false;
+ bool success = args->GetBoolean(0, &open_activity_controls_url);
+ DCHECK(success);
+ CloseModalSigninWindow(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS,
+ open_activity_controls_url);
}
void SyncConfirmationHandler::HandleGoToSettings(const base::ListValue* args) {
- CloseModalSigninWindow(LoginUIService::CONFIGURE_SYNC_FIRST);
+ bool open_activity_controls_url = false;
+ bool success = args->GetBoolean(0, &open_activity_controls_url);
+ DCHECK(success);
+ CloseModalSigninWindow(LoginUIService::CONFIGURE_SYNC_FIRST,
+ open_activity_controls_url);
}
void SyncConfirmationHandler::HandleUndo(const base::ListValue* args) {
content::RecordAction(base::UserMetricsAction("Signin_Undo_Signin"));
Browser* browser = GetDesktopBrowser();
LoginUIServiceFactory::GetForProfile(browser->profile())->
- SyncConfirmationUIClosed(LoginUIService::ABORT_SIGNIN);
+ SyncConfirmationUIClosed(LoginUIService::ABORT_SIGNIN, false);
SigninManagerFactory::GetForProfile(Profile::FromWebUI(web_ui()))->SignOut(
signin_metrics::ABORT_SIGNIN,
signin_metrics::SignoutDelete::IGNORE_METRIC);
@@ -105,9 +115,10 @@ Browser* SyncConfirmationHandler::GetDesktopBrowser() {
}
void SyncConfirmationHandler::CloseModalSigninWindow(
- LoginUIService::SyncConfirmationUIClosedResults results) {
+ LoginUIService::SyncConfirmationUIClosedResults results,
Evan Stade 2016/03/29 22:50:21 nit: SyncConfirmationUIClosedResults made me think
Moe 2016/03/30 18:07:47 Done.
+ bool open_activity_controls_url) {
Browser* browser = GetDesktopBrowser();
LoginUIServiceFactory::GetForProfile(browser->profile())->
- SyncConfirmationUIClosed(results);
+ SyncConfirmationUIClosed(results, open_activity_controls_url);
browser->CloseModalSigninWindow();
}

Powered by Google App Engine
This is Rietveld 408576698