| Index: chrome/browser/profiles/profile_manager.cc
|
| ===================================================================
|
| --- chrome/browser/profiles/profile_manager.cc (revision 202001)
|
| +++ chrome/browser/profiles/profile_manager.cc (working copy)
|
| @@ -163,31 +163,6 @@
|
| ProfilesToDelete().push_back(path);
|
| }
|
|
|
| -// Called upon completion of profile creation. This function takes care of
|
| -// launching a new browser window and signing the user in to their Google
|
| -// account.
|
| -void OnOpenWindowForNewProfile(
|
| - chrome::HostDesktopType desktop_type,
|
| - const ProfileManager::CreateCallback& callback,
|
| - Profile* profile,
|
| - Profile::CreateStatus status) {
|
| - // Invoke the callback before we open a window for this new profile, so the
|
| - // callback has a chance to update the profile state first (to do things like
|
| - // sign in the profile).
|
| - if (!callback.is_null())
|
| - callback.Run(profile, status);
|
| -
|
| - if (status == Profile::CREATE_STATUS_INITIALIZED) {
|
| -
|
| - ProfileManager::FindOrCreateNewWindowForProfile(
|
| - profile,
|
| - chrome::startup::IS_PROCESS_STARTUP,
|
| - chrome::startup::IS_FIRST_RUN,
|
| - desktop_type,
|
| - false);
|
| - }
|
| -}
|
| -
|
| #if defined(OS_CHROMEOS)
|
| void CheckCryptohomeIsMounted(chromeos::DBusMethodCallStatus call_status,
|
| bool is_mounted) {
|
| @@ -893,14 +868,11 @@
|
| return new_path;
|
| }
|
|
|
| -// TODO(robertshield): ProfileManager should not be opening windows and should
|
| -// not have to care about HostDesktopType. See http://crbug.com/153864
|
| // static
|
| void ProfileManager::CreateMultiProfileAsync(
|
| const string16& name,
|
| const string16& icon_url,
|
| const CreateCallback& callback,
|
| - chrome::HostDesktopType desktop_type,
|
| bool is_managed) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -909,9 +881,7 @@
|
| base::FilePath new_path = profile_manager->GenerateNextProfileDirectoryPath();
|
|
|
| profile_manager->CreateProfileAsync(new_path,
|
| - base::Bind(&OnOpenWindowForNewProfile,
|
| - desktop_type,
|
| - callback),
|
| + callback,
|
| name,
|
| icon_url,
|
| is_managed);
|
| @@ -1031,11 +1001,9 @@
|
| return go_off_the_record;
|
| }
|
|
|
| -// TODO(robertshield): ProfileManager should not be opening windows and should
|
| -// not have to care about HostDesktopType. See http://crbug.com/153864
|
| void ProfileManager::ScheduleProfileForDeletion(
|
| const base::FilePath& profile_dir,
|
| - chrome::HostDesktopType desktop_type) {
|
| + const CreateCallback& callback) {
|
| DCHECK(IsMultipleProfilesEnabled());
|
|
|
| PrefService* local_state = g_browser_process->local_state();
|
| @@ -1060,13 +1028,8 @@
|
| // correct last used profile is set for any notification observers.
|
| local_state->SetString(prefs::kProfileLastUsed,
|
| new_path.BaseName().MaybeAsASCII());
|
| - // TODO(robertshield): This desktop type needs to come from the invoker,
|
| - // currently that involves plumbing this through web UI.
|
| - chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
|
| CreateProfileAsync(new_path,
|
| - base::Bind(&OnOpenWindowForNewProfile,
|
| - desktop_type,
|
| - CreateCallback()),
|
| + callback,
|
| string16(),
|
| string16(),
|
| false);
|
|
|