Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / profiles / avatar_menu_actions_chromeos.cc
bloba2507ba6ee40cb907f03473a49df0edfbbee3eb9
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.h"
7 #include "ash/multi_profile_uma.h"
8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "chrome/browser/chromeos/login/user_manager.h"
11 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
12 #include "chrome/browser/ui/browser.h"
14 // static
15 AvatarMenuActions* AvatarMenuActions::Create() {
16 return new chromeos::AvatarMenuActionsChromeOS();
19 namespace chromeos {
21 AvatarMenuActionsChromeOS::AvatarMenuActionsChromeOS() {
24 AvatarMenuActionsChromeOS::~AvatarMenuActionsChromeOS() {
27 void AvatarMenuActionsChromeOS::AddNewProfile(ProfileMetrics::ProfileAdd type) {
28 // Let the user add another account to the session.
29 ash::MultiProfileUMA::RecordSigninUser(
30 ash::MultiProfileUMA::SIGNIN_USER_BY_BROWSER_FRAME);
31 ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
34 void AvatarMenuActionsChromeOS::EditProfile(Profile* profile, size_t index) {
35 NOTIMPLEMENTED();
38 bool AvatarMenuActionsChromeOS::ShouldShowAddNewProfileLink() const {
39 // |browser_| can be NULL in unit_tests.
40 return (!browser_ || !browser_->profile()->IsManaged()) &&
41 UserManager::Get()->GetUsersAdmittedForMultiProfile().size();
44 bool AvatarMenuActionsChromeOS::ShouldShowEditProfileLink() const {
45 return false;
48 void AvatarMenuActionsChromeOS::ActiveBrowserChanged(Browser* browser) {
49 browser_ = browser;
52 } // namespace chromeos