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

Unified Diff: chrome/browser/profiles/avatar_menu_model.cc

Issue 12539002: Hide the add new profile link for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix problem with unit test. Created 7 years, 8 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 | « no previous file | chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu_model.cc
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index f31163a3682a59b3569a62a337d11725436b0509..151acf930e2bb10d24547f60ef7c7e5e4bce412e 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -169,13 +169,10 @@ const AvatarMenuModel::Item& AvatarMenuModel::GetItemAt(size_t index) {
bool AvatarMenuModel::ShouldShowAddNewProfileLink() const {
#if defined(ENABLE_MANAGED_USERS)
- Profile* active_profile = NULL;
if (!browser_)
- active_profile = ProfileManager::GetLastUsedProfile();
- else
- active_profile = browser_->profile();
+ return true;
ManagedUserService* service = ManagedUserServiceFactory::GetForProfile(
- active_profile);
+ browser_->profile());
return !service->ProfileIsManaged();
#endif
return true;
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698