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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.h

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // be used to re-initialize the object to refer to a newly created profile. 125 // be used to re-initialize the object to refer to a newly created profile.
126 void Initialize(Profile* profile, Browser* browser); 126 void Initialize(Profile* profile, Browser* browser);
127 127
128 // SigninTracker::Observer override. 128 // SigninTracker::Observer override.
129 void SigninFailed(const GoogleServiceAuthError& error) override; 129 void SigninFailed(const GoogleServiceAuthError& error) override;
130 void SigninSuccess() override; 130 void SigninSuccess() override;
131 void AccountAddedToCookie(const GoogleServiceAuthError& error) override; 131 void AccountAddedToCookie(const GoogleServiceAuthError& error) override;
132 132
133 // LoginUIService::Observer override. 133 // LoginUIService::Observer override.
134 void OnSyncConfirmationUIClosed( 134 void OnSyncConfirmationUIClosed(
135 LoginUIService::SyncConfirmationUIClosedResults results) override; 135 LoginUIService::SyncConfirmationUIClosedResults results,
136 bool open_activity_controls_url) override;
136 137
137 // User input handler for the signin confirmation dialog. 138 // User input handler for the signin confirmation dialog.
138 class SigninDialogDelegate 139 class SigninDialogDelegate
139 : public ui::ProfileSigninConfirmationDelegate { 140 : public ui::ProfileSigninConfirmationDelegate {
140 public: 141 public:
141 SigninDialogDelegate( 142 SigninDialogDelegate(
142 base::WeakPtr<OneClickSigninSyncStarter> sync_starter); 143 base::WeakPtr<OneClickSigninSyncStarter> sync_starter);
143 virtual ~SigninDialogDelegate(); 144 virtual ~SigninDialogDelegate();
144 void OnCancelSignin() override; 145 void OnCancelSignin() override;
145 void OnContinueSignin() override; 146 void OnContinueSignin() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // signin is completed. 189 // signin is completed.
189 void UntrustedSigninConfirmed(StartSyncMode response); 190 void UntrustedSigninConfirmed(StartSyncMode response);
190 191
191 // GetProfileSyncService returns non-NULL pointer if sync is enabled. 192 // GetProfileSyncService returns non-NULL pointer if sync is enabled.
192 // There is a scenario when when ProfileSyncService discovers that sync is 193 // There is a scenario when when ProfileSyncService discovers that sync is
193 // disabled during setup. In this case GetProfileSyncService will return NULL, 194 // disabled during setup. In this case GetProfileSyncService will return NULL,
194 // but we still need to call PSS::SetSetupInProgress(false). For this purpose 195 // but we still need to call PSS::SetSetupInProgress(false). For this purpose
195 // call FinishProfileSyncServiceSetup() function. 196 // call FinishProfileSyncServiceSetup() function.
196 ProfileSyncService* GetProfileSyncService(); 197 ProfileSyncService* GetProfileSyncService();
197 198
199 void SetFirstSetupComplete();
200
198 void FinishProfileSyncServiceSetup(); 201 void FinishProfileSyncServiceSetup();
199 202
200 // Displays the settings UI and brings up the advanced sync settings 203 // Displays the settings UI and brings up the advanced sync settings
201 // dialog if |configure_sync| is true. The web contents provided to the 204 // dialog if |configure_sync| is true. The web contents provided to the
202 // constructor is used if it's showing a blank page and not about to be 205 // constructor is used if it's showing a blank page and not about to be
203 // closed. Otherwise, a new tab or an existing settings tab is used. 206 // closed. Otherwise, a new tab or an existing settings tab is used.
204 void ShowSettingsPage(bool configure_sync); 207 void ShowSettingsPage(bool configure_sync);
205 208
206 // Displays a settings page in the provided web contents. |sub_page| can be 209 // Displays a settings page in the provided web contents. |sub_page| can be
207 // empty to show the main settings page. 210 // empty to show the main settings page.
(...skipping 25 matching lines...) Expand all
233 std::string dm_token_; 236 std::string dm_token_;
234 std::string client_id_; 237 std::string client_id_;
235 238
236 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; 239 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_;
237 240
238 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); 241 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter);
239 }; 242 };
240 243
241 244
242 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 245 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698