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

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 comments 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 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::SyncConfirmationUIClosedResult result) override;
136 136
137 // User input handler for the signin confirmation dialog. 137 // User input handler for the signin confirmation dialog.
138 class SigninDialogDelegate 138 class SigninDialogDelegate
139 : public ui::ProfileSigninConfirmationDelegate { 139 : public ui::ProfileSigninConfirmationDelegate {
140 public: 140 public:
141 SigninDialogDelegate( 141 SigninDialogDelegate(
142 base::WeakPtr<OneClickSigninSyncStarter> sync_starter); 142 base::WeakPtr<OneClickSigninSyncStarter> sync_starter);
143 virtual ~SigninDialogDelegate(); 143 virtual ~SigninDialogDelegate();
144 void OnCancelSignin() override; 144 void OnCancelSignin() override;
145 void OnContinueSignin() override; 145 void OnContinueSignin() override;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // signin is completed. 188 // signin is completed.
189 void UntrustedSigninConfirmed(StartSyncMode response); 189 void UntrustedSigninConfirmed(StartSyncMode response);
190 190
191 // GetProfileSyncService returns non-NULL pointer if sync is enabled. 191 // GetProfileSyncService returns non-NULL pointer if sync is enabled.
192 // There is a scenario when when ProfileSyncService discovers that sync is 192 // There is a scenario when when ProfileSyncService discovers that sync is
193 // disabled during setup. In this case GetProfileSyncService will return NULL, 193 // disabled during setup. In this case GetProfileSyncService will return NULL,
194 // but we still need to call PSS::SetSetupInProgress(false). For this purpose 194 // but we still need to call PSS::SetSetupInProgress(false). For this purpose
195 // call FinishProfileSyncServiceSetup() function. 195 // call FinishProfileSyncServiceSetup() function.
196 ProfileSyncService* GetProfileSyncService(); 196 ProfileSyncService* GetProfileSyncService();
197 197
198 void SetFirstSetupComplete();
199
198 void FinishProfileSyncServiceSetup(); 200 void FinishProfileSyncServiceSetup();
199 201
200 // Displays the settings UI and brings up the advanced sync settings 202 // Displays the settings UI and brings up the advanced sync settings
201 // dialog if |configure_sync| is true. The web contents provided to the 203 // 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 204 // 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. 205 // closed. Otherwise, a new tab or an existing settings tab is used.
204 void ShowSettingsPage(bool configure_sync); 206 void ShowSettingsPage(bool configure_sync);
205 207
206 // Displays a settings page in the provided web contents. |sub_page| can be 208 // Displays a settings page in the provided web contents. |sub_page| can be
207 // empty to show the main settings page. 209 // empty to show the main settings page.
(...skipping 25 matching lines...) Expand all
233 std::string dm_token_; 235 std::string dm_token_;
234 std::string client_id_; 236 std::string client_id_;
235 237
236 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; 238 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_;
237 239
238 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); 240 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter);
239 }; 241 };
240 242
241 243
242 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ 244 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698