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

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

Issue 2844193002: Add UMA histogram to track the various sources that request the feedback app (Closed)
Patch Set: Created 3 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
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_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/metrics/user_metrics.h" 9 #include "base/metrics/user_metrics.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "chrome/app/chrome_command_ids.h" 12 #include "chrome/app/chrome_command_ids.h"
13 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 13 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/browsing_data/browsing_data_helper.h" 15 #include "chrome/browser/browsing_data/browsing_data_helper.h"
16
17 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" 16 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h"
18 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/devtools/devtools_window.h" 18 #include "chrome/browser/devtools/devtools_window.h"
20 #include "chrome/browser/dom_distiller/tab_utils.h" 19 #include "chrome/browser/dom_distiller/tab_utils.h"
21 #include "chrome/browser/lifetime/application_lifetime.h" 20 #include "chrome/browser/lifetime/application_lifetime.h"
22 #include "chrome/browser/media/router/media_router_dialog_controller.h" // nogn check 21 #include "chrome/browser/media/router/media_router_dialog_controller.h" // nogn check
23 #include "chrome/browser/media/router/media_router_feature.h" 22 #include "chrome/browser/media/router/media_router_feature.h"
24 #include "chrome/browser/platform_util.h" 23 #include "chrome/browser/platform_util.h"
25 #include "chrome/browser/prefs/incognito_mode_prefs.h" 24 #include "chrome/browser/prefs/incognito_mode_prefs.h"
26 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 1095
1097 void OpenTaskManager(Browser* browser) { 1096 void OpenTaskManager(Browser* browser) {
1098 #if !defined(OS_ANDROID) 1097 #if !defined(OS_ANDROID)
1099 base::RecordAction(UserMetricsAction("TaskManager")); 1098 base::RecordAction(UserMetricsAction("TaskManager"));
1100 chrome::ShowTaskManager(browser); 1099 chrome::ShowTaskManager(browser);
1101 #else 1100 #else
1102 NOTREACHED(); 1101 NOTREACHED();
1103 #endif 1102 #endif
1104 } 1103 }
1105 1104
1106 void OpenFeedbackDialog(Browser* browser) { 1105 void OpenFeedbackDialog(Browser* browser, FeedbackSource source) {
1107 base::RecordAction(UserMetricsAction("Feedback")); 1106 base::RecordAction(UserMetricsAction("Feedback"));
1108 chrome::ShowFeedbackPage(browser, std::string(), std::string()); 1107 chrome::ShowFeedbackPage(browser, source, "" /* description_template */,
1108 "" /* category_tag */);
1109 } 1109 }
1110 1110
1111 void ToggleBookmarkBar(Browser* browser) { 1111 void ToggleBookmarkBar(Browser* browser) {
1112 base::RecordAction(UserMetricsAction("ShowBookmarksBar")); 1112 base::RecordAction(UserMetricsAction("ShowBookmarksBar"));
1113 ToggleBookmarkBarWhenVisible(browser->profile()); 1113 ToggleBookmarkBarWhenVisible(browser->profile());
1114 } 1114 }
1115 1115
1116 void ShowAppMenu(Browser* browser) { 1116 void ShowAppMenu(Browser* browser) {
1117 // We record the user metric for this event in AppMenu::RunMenu. 1117 // We record the user metric for this event in AppMenu::RunMenu.
1118 browser->window()->ShowAppMenu(); 1118 browser->window()->ShowAppMenu();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 } 1297 }
1298 1298
1299 bool CanCreateBookmarkApp(const Browser* browser) { 1299 bool CanCreateBookmarkApp(const Browser* browser) {
1300 return extensions::TabHelper::FromWebContents( 1300 return extensions::TabHelper::FromWebContents(
1301 browser->tab_strip_model()->GetActiveWebContents()) 1301 browser->tab_strip_model()->GetActiveWebContents())
1302 ->CanCreateBookmarkApp(); 1302 ->CanCreateBookmarkApp();
1303 } 1303 }
1304 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 1304 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
1305 1305
1306 } // namespace chrome 1306 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698