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

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: rebase Created 4 years, 8 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_handler.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12029478ffeeb2f98a057cd12a4666e8a97060fd..c52bd116d367ef7f0cc342619c5df962807460df 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"
@@ -42,11 +44,23 @@ 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);
+ uint32_t result = LoginUIService::SYNC_WITH_DEFAULT_SETTINGS;
+ if (open_activity_controls_url)
+ result |= LoginUIService::OPEN_ACTIVITY_CONTROLS_URL;
+ CloseModalSigninWindow(result);
}
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);
+ uint32_t result = LoginUIService::CONFIGURE_SYNC_FIRST;
+ if (open_activity_controls_url)
+ result |= LoginUIService::OPEN_ACTIVITY_CONTROLS_URL;
+ CloseModalSigninWindow(result);
}
void SyncConfirmationHandler::HandleUndo(const base::ListValue* args) {
@@ -88,11 +102,10 @@ Browser* SyncConfirmationHandler::GetDesktopBrowser() {
return browser;
}
-void SyncConfirmationHandler::CloseModalSigninWindow(
- LoginUIService::SyncConfirmationUIClosedResults results) {
+void SyncConfirmationHandler::CloseModalSigninWindow(uint32_t result) {
Browser* browser = GetDesktopBrowser();
LoginUIServiceFactory::GetForProfile(browser->profile())->
- SyncConfirmationUIClosed(results);
+ SyncConfirmationUIClosed(result);
browser->CloseModalSigninWindow();
}
« no previous file with comments | « chrome/browser/ui/webui/signin/sync_confirmation_handler.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698