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

Unified Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.h

Issue 14667012: Merge 198866 "Move post-signin confirmation bubble to OneClickSi..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/sync/one_click_signin_sync_starter.h
===================================================================
--- chrome/browser/ui/sync/one_click_signin_sync_starter.h (revision 199941)
+++ chrome/browser/ui/sync/one_click_signin_sync_starter.h (working copy)
@@ -38,6 +38,19 @@
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_UNTRUSTED_SIGNIN,
+
+ // 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 @@
const std::string& password,
StartSyncMode start_mode,
bool force_same_tab_navigation,
- bool display_confirmation);
+ ConfirmationRequired display_confirmation);
private:
virtual ~OneClickSigninSyncStarter();
@@ -94,28 +107,37 @@
// confirmation is required (in which case we have to prompt the user first).
void ConfirmSignin(const std::string& oauth_token);
- // Displays confirmation UI to the user if confirmation_required_ is true,
- // otherwise completes the pending signin process.
- void SigninAfterSAMLConfirmation();
+ // Displays confirmation UI to the user if confirmation_required_ ==
+ // CONFIRM_UNTRUSTED_SIGNIN, otherwise completes the pending signin process.
+ void ConfirmAndSignin();
// 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 UntrustedSigninConfirmed(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)
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698