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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years 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
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/browser_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 ToggleBookmarkBarWhenVisible(browser->profile()); 1096 ToggleBookmarkBarWhenVisible(browser->profile());
1097 } 1097 }
1098 1098
1099 void ShowAppMenu(Browser* browser) { 1099 void ShowAppMenu(Browser* browser) {
1100 // We record the user metric for this event in AppMenu::RunMenu. 1100 // We record the user metric for this event in AppMenu::RunMenu.
1101 browser->window()->ShowAppMenu(); 1101 browser->window()->ShowAppMenu();
1102 } 1102 }
1103 1103
1104 void ShowAvatarMenu(Browser* browser) { 1104 void ShowAvatarMenu(Browser* browser) {
1105 browser->window()->ShowAvatarBubbleFromAvatarButton( 1105 browser->window()->ShowAvatarBubbleFromAvatarButton(
1106 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, 1106 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, signin::ManageAccountsParams(),
1107 signin::ManageAccountsParams()); 1107 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN);
1108 } 1108 }
1109 1109
1110 void ShowFastUserSwitcher(Browser* browser) { 1110 void ShowFastUserSwitcher(Browser* browser) {
1111 browser->window()->ShowAvatarBubbleFromAvatarButton( 1111 browser->window()->ShowAvatarBubbleFromAvatarButton(
1112 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH, 1112 BrowserWindow::AVATAR_BUBBLE_MODE_FAST_USER_SWITCH,
1113 signin::ManageAccountsParams()); 1113 signin::ManageAccountsParams(),
1114 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN);
1114 } 1115 }
1115 1116
1116 void OpenUpdateChromeDialog(Browser* browser) { 1117 void OpenUpdateChromeDialog(Browser* browser) {
1117 if (UpgradeDetector::GetInstance()->is_outdated_install()) { 1118 if (UpgradeDetector::GetInstance()->is_outdated_install()) {
1118 content::NotificationService::current()->Notify( 1119 content::NotificationService::current()->Notify(
1119 chrome::NOTIFICATION_OUTDATED_INSTALL, 1120 chrome::NOTIFICATION_OUTDATED_INSTALL,
1120 content::NotificationService::AllSources(), 1121 content::NotificationService::AllSources(),
1121 content::NotificationService::NoDetails()); 1122 content::NotificationService::NoDetails());
1122 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { 1123 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) {
1123 content::NotificationService::current()->Notify( 1124 content::NotificationService::current()->Notify(
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 browser->host_desktop_type())); 1320 browser->host_desktop_type()));
1320 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1321 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1321 1322
1322 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1323 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1323 contents->GetRenderViewHost()->SyncRendererPrefs(); 1324 contents->GetRenderViewHost()->SyncRendererPrefs();
1324 app_browser->window()->Show(); 1325 app_browser->window()->Show();
1325 } 1326 }
1326 #endif // defined(ENABLE_EXTENSIONS) 1327 #endif // defined(ENABLE_EXTENSIONS)
1327 1328
1328 } // namespace chrome 1329 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/browser_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698