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

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

Issue 2594703002: Create a new profile and sign in the user. (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/sync/one_click_signin_sync_starter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 956efa19aad5040b18774f26793aa37c5540b7ad..efd09d5004363dcd4576dfcc77af0e39436577d7 100644
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter.h
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter.h
@@ -41,6 +41,17 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer,
public content::WebContentsObserver,
public LoginUIService::Observer {
public:
+ enum ProfileMode {
+ // Attempts to sign the user in |profile_|. Note that if the account to be
+ // signed in is a managed account, then a profile confirmation dialog is
+ // shown and the user has the possibility to create a new profile before
+ // signing in.
+ CURRENT_PROFILE,
+
+ // Creates a new profile and signs the user in this new profile.
+ NEW_PROFILE
+ };
+
enum StartSyncMode {
// Starts the process of signing the user in with the SigninManager, and
// once completed automatically starts sync with all data types enabled.
@@ -105,6 +116,7 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer,
const std::string& email,
const std::string& password,
const std::string& refresh_token,
+ ProfileMode profile_mode,
StartSyncMode start_mode,
content::WebContents* web_contents,
ConfirmationRequired display_confirmation,
@@ -184,7 +196,7 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer,
// Callback invoked to check whether the user needs policy or if a
// confirmation is required (in which case we have to prompt the user first).
- void ConfirmSignin(const std::string& oauth_token);
+ void ConfirmSignin(ProfileMode profile_mode, const std::string& oauth_token);
// Displays confirmation UI to the user if confirmation_required_ ==
// CONFIRM_UNTRUSTED_SIGNIN, otherwise completes the pending signin process.
@@ -248,6 +260,10 @@ class OneClickSigninSyncStarter : public SigninTracker::Observer,
// Prevents Sync from running until configuration is complete.
std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_;
+ // Temporary flag to disable new sync confirm page if user choose to create a
+ // new profile after the corp account signin.
+ bool skip_sync_confirm_;
+
base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_;
DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter);
« no previous file with comments | « no previous file | 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