| 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 0e88c6187c364ec3fe807a4a35fd4857f238299d..47eb8097b92d949da9483f9f66e3283361d698a8 100644
|
| --- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| +++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
|
| @@ -38,6 +38,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"
|
| @@ -101,16 +102,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 GetAvatarImageAtIndex(
|
| size_t index, ProfileInfoCache* info_cache) {
|
| bool is_gaia_picture =
|
| @@ -481,8 +472,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(&profiles::helper::OpenNewWindowForProfile));
|
| ProfileMetrics::LogProfileDeleteUser(
|
| ProfileMetrics::DELETE_PROFILE_USER_MANAGER);
|
| }
|
|
|