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

Unified Diff: chrome/browser/ntp_snippets/ntp_snippets_metrics.cc

Issue 2626643002: Stop showing notifications if they're ignored (Closed)
Patch Set: String.equals() Created 3 years, 11 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/ntp_snippets/ntp_snippets_metrics.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ntp_snippets/ntp_snippets_metrics.cc
diff --git a/chrome/browser/ntp_snippets/ntp_snippets_metrics.cc b/chrome/browser/ntp_snippets/ntp_snippets_metrics.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5084741cb5b59dd103683071afdae01a0c43b630
--- /dev/null
+++ b/chrome/browser/ntp_snippets/ntp_snippets_metrics.cc
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ntp_snippets/ntp_snippets_metrics.h"
+
+#include "base/metrics/histogram_macros.h"
+
+namespace {
+
+const char kContentSuggestionsNotificationImpressions[] =
+ "NewTabPage.ContentSuggestions.Notifications.Impressions";
+const char kContentSuggestionsNotificationActions[] =
+ "NewTabPage.ContentSuggestions.Notifications.Actions";
+const char kContentSuggestionsNotificationOptOuts[] =
+ "NewTabPage.ContentSuggestions.Notifications.AutoOptOuts";
+
+} // namespace
+
+void RecordContentSuggestionsNotificationImpression(
+ ContentSuggestionsNotificationImpression what) {
+ UMA_HISTOGRAM_ENUMERATION(kContentSuggestionsNotificationImpressions, what,
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_IMPRESSION);
+}
+
+void RecordContentSuggestionsNotificationAction(
+ ContentSuggestionsNotificationAction what) {
+ UMA_HISTOGRAM_ENUMERATION(kContentSuggestionsNotificationActions, what,
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_ACTION);
+}
+
+void RecordContentSuggestionsNotificationOptOut(
+ ContentSuggestionsNotificationOptOut what) {
+ UMA_HISTOGRAM_ENUMERATION(kContentSuggestionsNotificationOptOuts, what,
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_OPT_OUT);
+}
« no previous file with comments | « chrome/browser/ntp_snippets/ntp_snippets_metrics.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698