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

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

Issue 2163173004: Updates the list of signed-in profiles in user manager on ProfileAuthInfoChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/webui/signin/signin_create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
index 0ac75fffb66535e265dec8a8288eaf7dd08ed268..a892107990a4aa6708ea849461af8a1e826f6730 100644
--- a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
+++ b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
@@ -55,13 +55,18 @@
SigninCreateProfileHandler::SigninCreateProfileHandler()
: profile_creation_type_(NO_CREATION_IN_PROGRESS),
- weak_ptr_factory_(this) {}
+ weak_ptr_factory_(this) {
+ g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().AddObserver(this);
+}
SigninCreateProfileHandler::~SigninCreateProfileHandler() {
#if defined(ENABLE_SUPERVISED_USERS)
// Cancellation is only supported for supervised users.
CancelProfileRegistration(false);
#endif
+ g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().RemoveObserver(this);
}
void SigninCreateProfileHandler::GetLocalizedValues(
@@ -214,6 +219,11 @@ void SigninCreateProfileHandler::RequestSignedInProfiles(
user_info_list);
}
+void SigninCreateProfileHandler::OnProfileAuthInfoChanged(
+ const base::FilePath& profile_path) {
+ RequestSignedInProfiles(nullptr);
+}
+
void SigninCreateProfileHandler::CreateProfile(const base::ListValue* args) {
if (!profiles::IsMultipleProfilesEnabled())
return;

Powered by Google App Engine
This is Rietveld 408576698