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); |
+} |