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

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

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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
« no previous file with comments | « chrome/browser/signin/signin_header_helper.cc ('k') | chrome/browser/ui/browser_window.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 12 matching lines...) Expand all
23 #include "chrome/browser/lifetime/application_lifetime.h" 23 #include "chrome/browser/lifetime/application_lifetime.h"
24 #include "chrome/browser/platform_util.h" 24 #include "chrome/browser/platform_util.h"
25 #include "chrome/browser/prefs/incognito_mode_prefs.h" 25 #include "chrome/browser/prefs/incognito_mode_prefs.h"
26 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/rlz/rlz.h" 27 #include "chrome/browser/rlz/rlz.h"
28 #include "chrome/browser/search/search.h" 28 #include "chrome/browser/search/search.h"
29 #include "chrome/browser/sessions/session_service_factory.h" 29 #include "chrome/browser/sessions/session_service_factory.h"
30 #include "chrome/browser/sessions/tab_restore_service.h" 30 #include "chrome/browser/sessions/tab_restore_service.h"
31 #include "chrome/browser/sessions/tab_restore_service_delegate.h" 31 #include "chrome/browser/sessions/tab_restore_service_delegate.h"
32 #include "chrome/browser/sessions/tab_restore_service_factory.h" 32 #include "chrome/browser/sessions/tab_restore_service_factory.h"
33 #include "chrome/browser/signin/signin_header_helper.h"
33 #include "chrome/browser/translate/translate_tab_helper.h" 34 #include "chrome/browser/translate/translate_tab_helper.h"
34 #include "chrome/browser/ui/accelerator_utils.h" 35 #include "chrome/browser/ui/accelerator_utils.h"
35 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" 36 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
36 #include "chrome/browser/ui/browser.h" 37 #include "chrome/browser/ui/browser.h"
37 #include "chrome/browser/ui/browser_command_controller.h" 38 #include "chrome/browser/ui/browser_command_controller.h"
38 #include "chrome/browser/ui/browser_dialogs.h" 39 #include "chrome/browser/ui/browser_dialogs.h"
39 #include "chrome/browser/ui/browser_instant_controller.h" 40 #include "chrome/browser/ui/browser_instant_controller.h"
40 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" 41 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
41 #include "chrome/browser/ui/browser_tabstrip.h" 42 #include "chrome/browser/ui/browser_tabstrip.h"
42 #include "chrome/browser/ui/browser_window.h" 43 #include "chrome/browser/ui/browser_window.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 ToggleBookmarkBarWhenVisible(browser->profile()); 1035 ToggleBookmarkBarWhenVisible(browser->profile());
1035 } 1036 }
1036 1037
1037 void ShowAppMenu(Browser* browser) { 1038 void ShowAppMenu(Browser* browser) {
1038 // We record the user metric for this event in WrenchMenu::RunMenu. 1039 // We record the user metric for this event in WrenchMenu::RunMenu.
1039 browser->window()->ShowAppMenu(); 1040 browser->window()->ShowAppMenu();
1040 } 1041 }
1041 1042
1042 void ShowAvatarMenu(Browser* browser) { 1043 void ShowAvatarMenu(Browser* browser) {
1043 browser->window()->ShowAvatarBubbleFromAvatarButton( 1044 browser->window()->ShowAvatarBubbleFromAvatarButton(
1044 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); 1045 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT,
1046 signin::GAIA_SERVICE_TYPE_NONE);
1045 } 1047 }
1046 1048
1047 void OpenUpdateChromeDialog(Browser* browser) { 1049 void OpenUpdateChromeDialog(Browser* browser) {
1048 if (UpgradeDetector::GetInstance()->is_outdated_install()) { 1050 if (UpgradeDetector::GetInstance()->is_outdated_install()) {
1049 content::NotificationService::current()->Notify( 1051 content::NotificationService::current()->Notify(
1050 chrome::NOTIFICATION_OUTDATED_INSTALL, 1052 chrome::NOTIFICATION_OUTDATED_INSTALL,
1051 content::NotificationService::AllSources(), 1053 content::NotificationService::AllSources(),
1052 content::NotificationService::NoDetails()); 1054 content::NotificationService::NoDetails());
1053 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) { 1055 } else if (UpgradeDetector::GetInstance()->is_outdated_install_no_au()) {
1054 content::NotificationService::current()->Notify( 1056 content::NotificationService::current()->Notify(
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 browser->profile(), 1259 browser->profile(),
1258 browser->host_desktop_type())); 1260 browser->host_desktop_type()));
1259 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1261 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1260 1262
1261 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1263 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1262 contents->GetRenderViewHost()->SyncRendererPrefs(); 1264 contents->GetRenderViewHost()->SyncRendererPrefs();
1263 app_browser->window()->Show(); 1265 app_browser->window()->Show();
1264 } 1266 }
1265 1267
1266 } // namespace chrome 1268 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_header_helper.cc ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698