| 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();
|
| }
|
|
|
|
|