| Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| index c5851af3faf61016b7e40772598e58f12a7453d6..10b3d4f9c9b11c6ca77fda2042584aae5d980102 100644
|
| --- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| @@ -39,6 +39,7 @@
|
| #include "chrome/browser/ui/chrome_pages.h"
|
| #include "chrome/browser/ui/singleton_tabs.h"
|
| #include "chrome/browser/ui/user_manager.h"
|
| +#include "chrome/browser/ui/webui/profile_helper.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| @@ -102,16 +103,6 @@ const int kMaxOAuthRetries = 3;
|
| void HandleAndDoNothing(const base::ListValue* args) {
|
| }
|
|
|
| -// This callback is run if the only profile has been deleted, and a new
|
| -// profile has been created to replace it.
|
| -void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status) {
|
| - if (status != Profile::CREATE_STATUS_INITIALIZED)
|
| - return;
|
| - profiles::FindOrCreateNewWindowForProfile(
|
| - profile, chrome::startup::IS_PROCESS_STARTUP,
|
| - chrome::startup::IS_FIRST_RUN, false);
|
| -}
|
| -
|
| std::string GetAvatarImage(const ProfileAttributesEntry* entry) {
|
| bool is_gaia_picture = entry->IsUsingGAIAPicture() &&
|
| entry->GetGAIAPicture() != nullptr;
|
| @@ -475,8 +466,10 @@ void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
|
| return;
|
| }
|
|
|
| + // The callback is run if the only profile has been deleted, and a new
|
| + // profile has been created to replace it.
|
| g_browser_process->profile_manager()->ScheduleProfileForDeletion(
|
| - profile_path, base::Bind(&OpenNewWindowForProfile));
|
| + profile_path, base::Bind(&webui::OpenNewWindowForProfile));
|
| ProfileMetrics::LogProfileDeleteUser(
|
| ProfileMetrics::DELETE_PROFILE_USER_MANAGER);
|
| }
|
|
|