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

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: Split user-menu data based on GAIA service type Created 6 years, 7 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 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 729
729 case extensions::CommandService::BROWSER_ACTION: 730 case extensions::CommandService::BROWSER_ACTION:
730 // BookmarkCurrentPage is called through a user gesture, so it is safe 731 // BookmarkCurrentPage is called through a user gesture, so it is safe
731 // to call ShowBrowserActionPopup. 732 // to call ShowBrowserActionPopup.
732 browser->window()->ShowBrowserActionPopup(extension); 733 browser->window()->ShowBrowserActionPopup(extension);
733 return; 734 return;
734 735
735 case extensions::CommandService::PAGE_ACTION: 736 case extensions::CommandService::PAGE_ACTION:
736 browser->window()->ShowPageActionPopup(extension); 737 browser->window()->ShowPageActionPopup(extension);
737 return; 738 return;
738 }; 739 }
739 } 740 }
740 741
741 BookmarkCurrentPageInternal(browser); 742 BookmarkCurrentPageInternal(browser);
742 } 743 }
743 744
744 bool CanBookmarkCurrentPage(const Browser* browser) { 745 bool CanBookmarkCurrentPage(const Browser* browser) {
745 return CanBookmarkCurrentPageInternal(browser, true); 746 return CanBookmarkCurrentPageInternal(browser, true);
746 } 747 }
747 748
748 void BookmarkAllTabs(Browser* browser) { 749 void BookmarkAllTabs(Browser* browser) {
(...skipping 285 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

Powered by Google App Engine
This is Rietveld 408576698