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

Side by Side Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 128553002: Add a new method to the ProfileInfoCacheObserver for signin status changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/value_conversions.h" 8 #include "base/value_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 virtual void OnProfileWasRemoved( 135 virtual void OnProfileWasRemoved(
136 const base::FilePath& profile_path, 136 const base::FilePath& profile_path,
137 const base::string16& profile_name) OVERRIDE { 137 const base::string16& profile_name) OVERRIDE {
138 // TODO(noms): Change 'SendUserList' to 'removeUser' JS-call when 138 // TODO(noms): Change 'SendUserList' to 'removeUser' JS-call when
139 // UserManager is able to find pod belonging to removed user. 139 // UserManager is able to find pod belonging to removed user.
140 user_manager_handler_->SendUserList(); 140 user_manager_handler_->SendUserList();
141 } 141 }
142 142
143 virtual void OnProfileWillBeRemoved(
144 const base::FilePath& profile_path) OVERRIDE {
145 // No-op. When the profile is actually removed, OnProfileWasRemoved
146 // will be called.
147 }
148
149 virtual void OnProfileNameChanged( 143 virtual void OnProfileNameChanged(
150 const base::FilePath& profile_path, 144 const base::FilePath& profile_path,
151 const base::string16& old_profile_name) OVERRIDE { 145 const base::string16& old_profile_name) OVERRIDE {
152 user_manager_handler_->SendUserList(); 146 user_manager_handler_->SendUserList();
153 } 147 }
154 148
155 virtual void OnProfileAvatarChanged( 149 virtual void OnProfileAvatarChanged(
156 const base::FilePath& profile_path) OVERRIDE { 150 const base::FilePath& profile_path) OVERRIDE {
157 user_manager_handler_->SendUserList(); 151 user_manager_handler_->SendUserList();
158 } 152 }
159 153
154 virtual void OnProfileSigninRequiredChanged(
155 const base::FilePath& profile_path) OVERRIDE {
156 user_manager_handler_->SendUserList();
157 }
158
160 ProfileManager* profile_manager_; 159 ProfileManager* profile_manager_;
161 160
162 UserManagerScreenHandler* user_manager_handler_; // Weak; owns us. 161 UserManagerScreenHandler* user_manager_handler_; // Weak; owns us.
163 162
164 DISALLOW_COPY_AND_ASSIGN(ProfileUpdateObserver); 163 DISALLOW_COPY_AND_ASSIGN(ProfileUpdateObserver);
165 }; 164 };
166 165
167 // UserManagerScreenHandler --------------------------------------------------- 166 // UserManagerScreenHandler ---------------------------------------------------
168 167
169 UserManagerScreenHandler::UserManagerScreenHandler() 168 UserManagerScreenHandler::UserManagerScreenHandler()
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 // The row of user pods should display the active user first. 410 // The row of user pods should display the active user first.
412 if (is_active_user) 411 if (is_active_user)
413 users_list.Insert(0, profile_value); 412 users_list.Insert(0, profile_value);
414 else 413 else
415 users_list.Append(profile_value); 414 users_list.Append(profile_value);
416 } 415 }
417 416
418 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", 417 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers",
419 users_list, base::FundamentalValue(false), base::FundamentalValue(true)); 418 users_list, base::FundamentalValue(false), base::FundamentalValue(true));
420 } 419 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698