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

Unified Diff: chrome/browser/ui/toolbar/app_menu_model.cc

Issue 2882013002: Add experiment for having a "Beta forum" link in the help menu. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/app_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/app_menu_model.cc b/chrome/browser/ui/toolbar/app_menu_model.cc
index f0a6172f36247984bbc032b568e5c3ed46c3a432..f9468e714b1ef1382ee070b083512881b9a19cc0 100644
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
@@ -68,6 +68,10 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
+#if defined(GOOGLE_CHROME_BUILD)
+#include "base/feature_list.h"
+#endif
+
#if defined(OS_CHROMEOS)
#include "chromeos/chromeos_switches.h"
#endif
@@ -129,6 +133,9 @@ void ZoomMenuModel::Build() {
#if defined(GOOGLE_CHROME_BUILD)
+const base::Feature kIncludeBetaForumMenuItem{
+ "IncludeBetaForumMenuItem", base::FEATURE_DISABLED_BY_DEFAULT};
+
class AppMenuModel::HelpMenuModel : public ui::SimpleMenuModel {
public:
HelpMenuModel(ui::SimpleMenuModel::Delegate* delegate,
@@ -146,6 +153,8 @@ class AppMenuModel::HelpMenuModel : public ui::SimpleMenuModel {
#endif
AddItem(IDC_ABOUT, l10n_util::GetStringUTF16(IDS_ABOUT));
AddItemWithStringId(IDC_HELP_PAGE_VIA_MENU, help_string_id);
+ if (base::FeatureList::IsEnabled(kIncludeBetaForumMenuItem))
+ AddItem(IDC_SHOW_BETA_FORUM, l10n_util::GetStringUTF16(IDS_BETA_FORUM));
if (browser_defaults::kShowHelpMenuItemIcon) {
ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance();
SetIcon(GetIndexOfCommandId(IDC_HELP_PAGE_VIA_MENU),
@@ -542,6 +551,11 @@ void AppMenuModel::LogMenuMetrics(int command_id) {
LogMenuAction(MENU_ACTION_HELP_PAGE_VIA_MENU);
break;
#if defined(GOOGLE_CHROME_BUILD)
+ case IDC_SHOW_BETA_FORUM:
+ if (!uma_action_recorded_)
+ UMA_HISTOGRAM_MEDIUM_TIMES("WrenchMenu.TimeToAction.BetaForum", delta);
+ LogMenuAction(MENU_ACTION_BETA_FORUM);
+ break;
case IDC_FEEDBACK:
if (!uma_action_recorded_)
UMA_HISTOGRAM_MEDIUM_TIMES("WrenchMenu.TimeToAction.Feedback", delta);
« no previous file with comments | « chrome/browser/ui/toolbar/app_menu_model.h ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698