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

Side by Side Diff: chrome/browser/ui/ash/session_state_delegate_chromeos.cc

Issue 52713008: Adding UMA statistics for multi profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/ash/session_state_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
6 6
7 #include "ash/multi_profile_uma.h"
7 #include "ash/session_state_observer.h" 8 #include "ash/session_state_observer.h"
8 #include "base/command_line.h" 9 #include "base/command_line.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/chromeos/login/screen_locker.h" 12 #include "chrome/browser/chromeos/login/screen_locker.h"
12 #include "chrome/browser/chromeos/login/user.h" 13 #include "chrome/browser/chromeos/login/user.h"
13 #include "chrome/browser/chromeos/login/user_adding_screen.h" 14 #include "chrome/browser/chromeos/login/user_adding_screen.h"
14 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 session_state_observer_list_.RemoveObserver(observer); 168 session_state_observer_list_.RemoveObserver(observer);
168 } 169 }
169 170
170 bool SessionStateDelegateChromeos::TransferWindowToDesktopOfUser( 171 bool SessionStateDelegateChromeos::TransferWindowToDesktopOfUser(
171 aura::Window* window, 172 aura::Window* window,
172 ash::MultiProfileIndex index) { 173 ash::MultiProfileIndex index) {
173 chrome::MultiUserWindowManager* window_manager = 174 chrome::MultiUserWindowManager* window_manager =
174 chrome::MultiUserWindowManager::GetInstance(); 175 chrome::MultiUserWindowManager::GetInstance();
175 if (!window_manager || window_manager->GetWindowOwner(window).empty()) 176 if (!window_manager || window_manager->GetWindowOwner(window).empty())
176 return false; 177 return false;
178
179 ash::MultiProfileUMA::RecordTeleportAction(
180 ash::MultiProfileUMA::TELEPORT_WINDOW_DRAG_AND_DROP);
181
177 DCHECK_LT(index, NumberOfLoggedInUsers()); 182 DCHECK_LT(index, NumberOfLoggedInUsers());
178 window_manager->ShowWindowForUser(window, 183 window_manager->ShowWindowForUser(window,
179 chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]->email()); 184 chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]->email());
180 return true; 185 return true;
181 } 186 }
182 187
183 void SessionStateDelegateChromeos::ActiveUserChanged( 188 void SessionStateDelegateChromeos::ActiveUserChanged(
184 const chromeos::User* active_user) { 189 const chromeos::User* active_user) {
185 FOR_EACH_OBSERVER(ash::SessionStateObserver, 190 FOR_EACH_OBSERVER(ash::SessionStateObserver,
186 session_state_observer_list_, 191 session_state_observer_list_,
187 ActiveUserChanged(active_user->email())); 192 ActiveUserChanged(active_user->email()));
188 } 193 }
189 194
190 void SessionStateDelegateChromeos::UserAddedToSession( 195 void SessionStateDelegateChromeos::UserAddedToSession(
191 const chromeos::User* added_user) { 196 const chromeos::User* added_user) {
192 FOR_EACH_OBSERVER(ash::SessionStateObserver, 197 FOR_EACH_OBSERVER(ash::SessionStateObserver,
193 session_state_observer_list_, 198 session_state_observer_list_,
194 UserAddedToSession(added_user->email())); 199 UserAddedToSession(added_user->email()));
195 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698