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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 1716163005: MD user manager (C++ for create profile flow) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698