Chromium Code Reviews| Index: chrome/browser/ui/sync/one_click_signin_sync_starter.h |
| diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter.h b/chrome/browser/ui/sync/one_click_signin_sync_starter.h |
| index a0e87cb52def7cceb17a778bb6142a1912f243cb..19a61f287f0c9cd5719fa391d831361479b4ce82 100644 |
| --- a/chrome/browser/ui/sync/one_click_signin_sync_starter.h |
| +++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.h |
| @@ -38,6 +38,19 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer { |
| UNDO_SYNC |
| }; |
| + enum ConfirmationRequired { |
| + // No need to display a "post-signin" confirmation bubble (for example, if |
| + // the user was doing a re-auth flow). |
| + NO_CONFIRMATION, |
| + |
| + // Signin flow redirected outside of trusted domains, so ask the user to |
| + // confirm before signing in. |
| + CONFIRM_SAML_SIGNIN, |
|
Roger Tawa OOO till Jul 10th
2013/05/03 15:16:47
The comment is correct, but saml is not necessaril
Andrew T Wilson (Slow)
2013/05/03 19:16:11
OK, will do.
|
| + |
| + // Display a confirmation after signing in. |
| + CONFIRM_AFTER_SIGNIN |
| + }; |
| + |
| // |profile| must not be NULL, however |browser| can be. When using the |
| // OneClickSigninSyncStarter from a browser, provide both. |
| // If |display_confirmation| is true, the user will be prompted to confirm the |
| @@ -49,7 +62,7 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer { |
| const std::string& password, |
| StartSyncMode start_mode, |
| bool force_same_tab_navigation, |
| - bool display_confirmation); |
| + ConfirmationRequired display_confirmation); |
| private: |
| virtual ~OneClickSigninSyncStarter(); |
| @@ -101,21 +114,30 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer { |
| // Callback invoked once the user has responded to the signin confirmation UI. |
| // If response == UNDO_SYNC, the signin is cancelled, otherwise the pending |
| // signin is completed. |
| - void SigninConfirmationComplete(StartSyncMode response); |
| + void SAMLConfirmationComplete(StartSyncMode response); |
| ProfileSyncService* GetProfileSyncService(); |
| - // Displays the sync configuration UI, then frees this object. |
| + // Displays the sync configuration UI. |
| void ConfigureSync(); |
| void ShowSyncSettingsPageOnSameTab(); |
| + // Shows the post-signin confirmation bubble. If |custom_message| is empty, |
| + // the default "You are signed in" message is displayed. |
| + void DisplayFinalConfirmationBubble(const string16& custom_message); |
| + |
| + // Makes sure browser_ points to a valid browser (opens a new browser if |
| + // necessary). Useful in the case where the user has created a new Profile as |
| + // part of the signin process. |
| + void EnsureBrowser(); |
| + |
| Profile* profile_; |
| Browser* browser_; |
| scoped_ptr<SigninTracker> signin_tracker_; |
| StartSyncMode start_mode_; |
| chrome::HostDesktopType desktop_type_; |
| bool force_same_tab_navigation_; |
| - bool confirmation_required_; |
| + ConfirmationRequired confirmation_required_; |
| base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; |
| #if defined(ENABLE_CONFIGURATION_POLICY) |