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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.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 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/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "grit/generated_resources.h" 74 #include "grit/generated_resources.h"
75 #include "grit/theme_resources.h" 75 #include "grit/theme_resources.h"
76 #include "grit/ui_resources.h" 76 #include "grit/ui_resources.h"
77 #include "net/base/url_util.h" 77 #include "net/base/url_util.h"
78 #include "ui/aura/root_window.h" 78 #include "ui/aura/root_window.h"
79 #include "ui/aura/window.h" 79 #include "ui/aura/window.h"
80 #include "ui/base/l10n/l10n_util.h" 80 #include "ui/base/l10n/l10n_util.h"
81 #include "ui/views/corewm/window_animations.h" 81 #include "ui/views/corewm/window_animations.h"
82 82
83 #if defined(OS_CHROMEOS) 83 #if defined(OS_CHROMEOS)
84 #include "ash/multi_profile_uma.h"
84 #include "chrome/browser/browser_process.h" 85 #include "chrome/browser/browser_process.h"
85 #include "chrome/browser/chromeos/login/user_manager.h" 86 #include "chrome/browser/chromeos/login/user_manager.h"
86 #include "chrome/browser/chromeos/login/wallpaper_manager.h" 87 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
87 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 88 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
88 #include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h" 89 #include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h"
89 #include "chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_con troller.h" 90 #include "chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_con troller.h"
90 #include "chrome/browser/ui/ash/multi_user_window_manager.h" 91 #include "chrome/browser/ui/ash/multi_user_window_manager.h"
91 #endif 92 #endif
92 93
93 using extensions::Extension; 94 using extensions::Extension;
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 bool allow_minimize) { 1035 bool allow_minimize) {
1035 #if defined(OS_CHROMEOS) 1036 #if defined(OS_CHROMEOS)
1036 if (chrome::MultiUserWindowManager::GetMultiProfileMode() == 1037 if (chrome::MultiUserWindowManager::GetMultiProfileMode() ==
1037 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED) { 1038 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED) {
1038 chrome::MultiUserWindowManager* manager = 1039 chrome::MultiUserWindowManager* manager =
1039 chrome::MultiUserWindowManager::GetInstance(); 1040 chrome::MultiUserWindowManager::GetInstance();
1040 aura::Window* native_window = window->GetNativeWindow(); 1041 aura::Window* native_window = window->GetNativeWindow();
1041 const std::string& current_user = 1042 const std::string& current_user =
1042 manager->GetUserIDFromProfile(profile()); 1043 manager->GetUserIDFromProfile(profile());
1043 if (!manager->IsWindowOnDesktopOfUser(native_window, current_user)) { 1044 if (!manager->IsWindowOnDesktopOfUser(native_window, current_user)) {
1045 ash::MultiProfileUMA::RecordTeleportAction(
1046 ash::MultiProfileUMA::TELEPORT_WINDOW_RETURN_BY_LAUNCHER);
1044 manager->ShowWindowForUser(native_window, current_user); 1047 manager->ShowWindowForUser(native_window, current_user);
1045 window->Activate(); 1048 window->Activate();
1046 return; 1049 return;
1047 } 1050 }
1048 } 1051 }
1049 #endif 1052 #endif
1050 if (window->IsActive() && allow_minimize) { 1053 if (window->IsActive() && allow_minimize) {
1051 if (CommandLine::ForCurrentProcess()->HasSwitch( 1054 if (CommandLine::ForCurrentProcess()->HasSwitch(
1052 switches::kDisableMinimizeOnSecondLauncherItemClick)) { 1055 switches::kDisableMinimizeOnSecondLauncherItemClick)) {
1053 AnimateWindow(window->GetNativeWindow(), 1056 AnimateWindow(window->GetNativeWindow(),
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 } 2058 }
2056 } 2059 }
2057 } 2060 }
2058 } 2061 }
2059 2062
2060 // Finally we update the browser state itself. 2063 // Finally we update the browser state itself.
2061 browser_status_monitor_->UpdateBrowserItemState(); 2064 browser_status_monitor_->UpdateBrowserItemState();
2062 #endif 2065 #endif
2063 } 2066 }
2064 2067
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698