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

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

Issue 15734006: Restructure user-creation flow and surface errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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.cc
===================================================================
--- chrome/browser/ui/sync/one_click_signin_sync_starter.cc (revision 202001)
+++ chrome/browser/ui/sync/one_click_signin_sync_starter.cc (working copy)
@@ -188,13 +188,13 @@
ProfileManager::CreateMultiProfileAsync(
UTF8ToUTF16(signin->GetUsernameForAuthInProgress()),
UTF8ToUTF16(ProfileInfoCache::GetDefaultAvatarIconUrl(icon_index)),
- base::Bind(&OneClickSigninSyncStarter::CompleteSigninForNewProfile,
- weak_pointer_factory_.GetWeakPtr()),
- desktop_type_,
+ base::Bind(&OneClickSigninSyncStarter::CompleteInitForNewProfile,
+ weak_pointer_factory_.GetWeakPtr(), desktop_type_),
false);
}
-void OneClickSigninSyncStarter::CompleteSigninForNewProfile(
+void OneClickSigninSyncStarter::CompleteInitForNewProfile(
+ chrome::HostDesktopType desktop_type,
Profile* new_profile,
Profile::CreateStatus status) {
DCHECK_NE(profile_, new_profile);
@@ -235,6 +235,14 @@
// Load policy for the just-created profile - once policy has finished
// loading the signin process will complete.
LoadPolicyWithCachedClient();
+
+ // Open the profile's first window, after all initialization.
+ ProfileManager::FindOrCreateNewWindowForProfile(
+ new_profile,
+ chrome::startup::IS_PROCESS_STARTUP,
+ chrome::startup::IS_FIRST_RUN,
+ desktop_type,
+ false);
}
}
#endif

Powered by Google App Engine
This is Rietveld 408576698