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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac/ChromeOS builds and iOS tests. Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
6 6
7 #import <Carbon/Carbon.h> // kVK_Return. 7 #import <Carbon/Carbon.h> // kVK_Return.
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU); 1120 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU);
1121 } 1121 }
1122 1122
1123 - (IBAction)showLearnMorePage:(id)sender { 1123 - (IBAction)showLearnMorePage:(id)sender {
1124 signin_ui_util::ShowSigninErrorLearnMorePage(browser_->profile()); 1124 signin_ui_util::ShowSigninErrorLearnMorePage(browser_->profile());
1125 } 1125 }
1126 1126
1127 - (IBAction)configureSyncSettings:(id)sender { 1127 - (IBAction)configureSyncSettings:(id)sender {
1128 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; 1128 tutorialMode_ = profiles::TUTORIAL_MODE_NONE;
1129 LoginUIServiceFactory::GetForProfile(browser_->profile())-> 1129 LoginUIServiceFactory::GetForProfile(browser_->profile())->
1130 SyncConfirmationUIClosed(true); 1130 SyncConfirmationUIClosed(LoginUIService::CONFIGURE_SYNC_FIRST);
1131 ProfileMetrics::LogProfileNewAvatarMenuSignin( 1131 ProfileMetrics::LogProfileNewAvatarMenuSignin(
1132 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_SETTINGS); 1132 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_SETTINGS);
1133 } 1133 }
1134 1134
1135 - (IBAction)syncSettingsConfirmed:(id)sender { 1135 - (IBAction)syncSettingsConfirmed:(id)sender {
1136 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; 1136 tutorialMode_ = profiles::TUTORIAL_MODE_NONE;
1137 LoginUIServiceFactory::GetForProfile(browser_->profile())-> 1137 LoginUIServiceFactory::GetForProfile(browser_->profile())->
1138 SyncConfirmationUIClosed(false); 1138 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS);
1139 ProfileMetrics::LogProfileNewAvatarMenuSignin( 1139 ProfileMetrics::LogProfileNewAvatarMenuSignin(
1140 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_OK); 1140 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_OK);
1141 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; 1141 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER];
1142 } 1142 }
1143 1143
1144 - (IBAction)disconnectProfile:(id)sender { 1144 - (IBAction)disconnectProfile:(id)sender {
1145 chrome::ShowSettings(browser_); 1145 chrome::ShowSettings(browser_);
1146 ProfileMetrics::LogProfileNewAvatarMenuNotYou( 1146 ProfileMetrics::LogProfileNewAvatarMenuNotYou(
1147 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT); 1147 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT);
1148 } 1148 }
(...skipping 18 matching lines...) Expand all
1167 prefs::kProfileAvatarRightClickTutorialDismissed, true); 1167 prefs::kProfileAvatarRightClickTutorialDismissed, true);
1168 } 1168 }
1169 1169
1170 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; 1170 tutorialMode_ = profiles::TUTORIAL_MODE_NONE;
1171 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; 1171 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER];
1172 } 1172 }
1173 1173
1174 - (void)windowWillClose:(NSNotification*)notification { 1174 - (void)windowWillClose:(NSNotification*)notification {
1175 if (tutorialMode_ == profiles::TUTORIAL_MODE_CONFIRM_SIGNIN) { 1175 if (tutorialMode_ == profiles::TUTORIAL_MODE_CONFIRM_SIGNIN) {
1176 LoginUIServiceFactory::GetForProfile(browser_->profile())-> 1176 LoginUIServiceFactory::GetForProfile(browser_->profile())->
1177 SyncConfirmationUIClosed(false); 1177 SyncConfirmationUIClosed(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS);
1178 } 1178 }
1179 1179
1180 [super windowWillClose:notification]; 1180 [super windowWillClose:notification];
1181 } 1181 }
1182 1182
1183 - (void)moveDown:(id)sender { 1183 - (void)moveDown:(id)sender {
1184 [[self window] selectNextKeyView:self]; 1184 [[self window] selectNextKeyView:self];
1185 } 1185 }
1186 1186
1187 - (void)moveUp:(id)sender { 1187 - (void)moveUp:(id)sender {
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 } 2407 }
2408 2408
2409 - (bool)shouldShowGoIncognito { 2409 - (bool)shouldShowGoIncognito {
2410 bool incognitoAvailable = 2410 bool incognitoAvailable =
2411 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2411 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2412 IncognitoModePrefs::DISABLED; 2412 IncognitoModePrefs::DISABLED;
2413 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2413 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2414 } 2414 }
2415 2415
2416 @end 2416 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698