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

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

Issue 25098009: Log UMA metrics for multiprofile actions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 7 years, 2 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
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/shell.h" 8 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
9 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
10 #include "chrome/browser/profiles/profile_info_util.h" 11 #include "chrome/browser/profiles/profile_info_util.h"
11 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
12 13
13 // static 14 // static
14 AvatarMenuActions* AvatarMenuActions::Create() { 15 AvatarMenuActions* AvatarMenuActions::Create() {
15 return new chromeos::AvatarMenuActionsChromeOS(); 16 return new chromeos::AvatarMenuActionsChromeOS();
16 } 17 }
17 18
18 namespace chromeos { 19 namespace chromeos {
19 20
20 AvatarMenuActionsChromeOS::AvatarMenuActionsChromeOS() { 21 AvatarMenuActionsChromeOS::AvatarMenuActionsChromeOS() {
21 } 22 }
22 23
23 AvatarMenuActionsChromeOS::~AvatarMenuActionsChromeOS() { 24 AvatarMenuActionsChromeOS::~AvatarMenuActionsChromeOS() {
24 } 25 }
25 26
26 void AvatarMenuActionsChromeOS::AddNewProfile(ProfileMetrics::ProfileAdd type) { 27 void AvatarMenuActionsChromeOS::AddNewProfile(ProfileMetrics::ProfileAdd type) {
27 // Let the user add another account to the session. 28 // Let the user add another account to the session.
29 ash::MultiProfileUMA::RecordSigninUser(
30 ash::MultiProfileUMA::SIGNIN_USER_BY_BROWSER_FRAME);
28 ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin(); 31 ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
29 } 32 }
30 33
31 void AvatarMenuActionsChromeOS::EditProfile(Profile* profile, size_t index) { 34 void AvatarMenuActionsChromeOS::EditProfile(Profile* profile, size_t index) {
32 NOTIMPLEMENTED(); 35 NOTIMPLEMENTED();
33 } 36 }
34 37
35 bool AvatarMenuActionsChromeOS::ShouldShowAddNewProfileLink() const { 38 bool AvatarMenuActionsChromeOS::ShouldShowAddNewProfileLink() const {
36 // |browser_| can be NULL in unit_tests. 39 // |browser_| can be NULL in unit_tests.
37 return (!browser_ || !browser_->profile()->IsManaged()) && 40 return (!browser_ || !browser_->profile()->IsManaged()) &&
(...skipping 11 matching lines...) Expand all
49 52
50 void AvatarMenuActionsChromeOS::SetLogoutURL(const std::string& logout_url) { 53 void AvatarMenuActionsChromeOS::SetLogoutURL(const std::string& logout_url) {
51 NOTIMPLEMENTED(); 54 NOTIMPLEMENTED();
52 } 55 }
53 56
54 void AvatarMenuActionsChromeOS::ActiveBrowserChanged(Browser* browser) { 57 void AvatarMenuActionsChromeOS::ActiveBrowserChanged(Browser* browser) {
55 browser_ = browser; 58 browser_ = browser;
56 } 59 }
57 60
58 } // namespace chromeos 61 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698