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

Side by Side Diff: chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.cc

Issue 1242793005: Refactor most c/b/profiles calls to ProfileInfoCache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows unit test and ChromeOS build Created 5 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 unified diff | Download patch
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/chromeos/profiles/avatar_menu_actions_chromeos.h" 5 #include "chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.h"
6 6
7 #include "ash/multi_profile_uma.h" 7 #include "ash/multi_profile_uma.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 14 matching lines...) Expand all
25 AvatarMenuActionsChromeOS::~AvatarMenuActionsChromeOS() { 25 AvatarMenuActionsChromeOS::~AvatarMenuActionsChromeOS() {
26 } 26 }
27 27
28 void AvatarMenuActionsChromeOS::AddNewProfile(ProfileMetrics::ProfileAdd type) { 28 void AvatarMenuActionsChromeOS::AddNewProfile(ProfileMetrics::ProfileAdd type) {
29 // Let the user add another account to the session. 29 // Let the user add another account to the session.
30 ash::MultiProfileUMA::RecordSigninUser( 30 ash::MultiProfileUMA::RecordSigninUser(
31 ash::MultiProfileUMA::SIGNIN_USER_BY_BROWSER_FRAME); 31 ash::MultiProfileUMA::SIGNIN_USER_BY_BROWSER_FRAME);
32 ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin(); 32 ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
33 } 33 }
34 34
35 void AvatarMenuActionsChromeOS::EditProfile(Profile* profile, size_t index) { 35 void AvatarMenuActionsChromeOS::EditProfile(Profile* profile) {
36 NOTIMPLEMENTED(); 36 NOTIMPLEMENTED();
37 } 37 }
38 38
39 bool AvatarMenuActionsChromeOS::ShouldShowAddNewProfileLink() const { 39 bool AvatarMenuActionsChromeOS::ShouldShowAddNewProfileLink() const {
40 // |browser_| can be NULL in unit_tests. 40 // |browser_| can be NULL in unit_tests.
41 return (!browser_ || !browser_->profile()->IsSupervised()) && 41 return (!browser_ || !browser_->profile()->IsSupervised()) &&
42 user_manager::UserManager::Get() 42 user_manager::UserManager::Get()
43 ->GetUsersAllowedForMultiProfile() 43 ->GetUsersAllowedForMultiProfile()
44 .size(); 44 .size();
45 } 45 }
46 46
47 bool AvatarMenuActionsChromeOS::ShouldShowEditProfileLink() const { 47 bool AvatarMenuActionsChromeOS::ShouldShowEditProfileLink() const {
48 return false; 48 return false;
49 } 49 }
50 50
51 void AvatarMenuActionsChromeOS::ActiveBrowserChanged(Browser* browser) { 51 void AvatarMenuActionsChromeOS::ActiveBrowserChanged(Browser* browser) {
52 browser_ = browser; 52 browser_ = browser;
53 } 53 }
54 54
55 } // namespace chromeos 55 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698