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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm

Issue 861053004: [Profiles] Send out less profile avatar related notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mike nit Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile_info_cache_observer.h" 10 #include "chrome/browser/profiles/profile_info_cache_observer.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 86 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
87 } 87 }
88 88
89 void OnProfileNameChanged(const base::FilePath& profile_path, 89 void OnProfileNameChanged(const base::FilePath& profile_path,
90 const base::string16& old_profile_name) override { 90 const base::string16& old_profile_name) override {
91 if (profile_->GetPath() == profile_path) 91 if (profile_->GetPath() == profile_path)
92 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 92 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
93 } 93 }
94 94
95 void OnProfileAvatarChanged(const base::FilePath& profile_path) override { 95 void OnProfileAvatarChanged(const base::FilePath& profile_path) override {
96 if (profile_->GetPath() == profile_path) 96 if (!switches::IsNewAvatarMenu() && profile_->GetPath() == profile_path)
97 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 97 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
98 } 98 }
99 99
100 void OnProfileSupervisedUserIdChanged( 100 void OnProfileSupervisedUserIdChanged(
101 const base::FilePath& profile_path) override { 101 const base::FilePath& profile_path) override {
102 if (profile_->GetPath() == profile_path) 102 if (profile_->GetPath() == profile_path)
103 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 103 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
104 } 104 }
105 105
106 // SigninErrorController::Observer: 106 // SigninErrorController::Observer:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 - (void)updateErrorStatus:(BOOL)hasError { 232 - (void)updateErrorStatus:(BOOL)hasError {
233 } 233 }
234 234
235 - (BaseBubbleController*)menuController { 235 - (BaseBubbleController*)menuController {
236 return menuController_; 236 return menuController_;
237 } 237 }
238 238
239 @end 239 @end
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_unittest.cc ('k') | chrome/browser/ui/views/profiles/new_avatar_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698