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

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

Powered by Google App Engine
This is Rietveld 408576698