Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / web_resource / notification_promo_helper.cc
blobeb0f8bb295fc8be12d085d320e6d6a505b33dc56
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/web_resource/notification_promo_helper.h"
7 #include "base/metrics/user_metrics_action.h"
8 #include "chrome/browser/browser_process.h"
9 #include "content/public/browser/user_metrics.h"
11 namespace web_resource {
13 void HandleNotificationPromoClosed(NotificationPromo::PromoType promo_type) {
14 content::RecordAction(base::UserMetricsAction("NTPPromoClosed"));
15 NotificationPromo::HandleClosed(promo_type, g_browser_process->local_state());
18 bool HandleNotificationPromoViewed(NotificationPromo::PromoType promo_type) {
19 content::RecordAction(base::UserMetricsAction("NTPPromoShown"));
20 return NotificationPromo::HandleViewed(promo_type,
21 g_browser_process->local_state());
24 } // namespace web_resource