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

Unified Diff: chrome/browser/web_resource/notification_promo.cc

Issue 8833009: Count of user dismissals of notification promo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: move NTPPromoShown to notification_promo.cc Created 9 years 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/webui/ntp/ntp_resource_cache.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/notification_promo.cc
===================================================================
--- chrome/browser/web_resource/notification_promo.cc (revision 112953)
+++ chrome/browser/web_resource/notification_promo.cc (working copy)
@@ -4,6 +4,8 @@
#include "chrome/browser/web_resource/notification_promo.h"
+#include <vector>
+
#include "base/bind.h"
#include "base/rand_util.h"
#include "base/string_number_conversions.h"
@@ -14,6 +16,7 @@
#include "chrome/browser/profiles/profile_impl.h"
#include "chrome/browser/web_resource/promo_resource_service.h"
#include "chrome/common/pref_names.h"
+#include "content/browser/user_metrics.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
@@ -332,10 +335,12 @@
}
void NotificationPromo::HandleClosed() {
+ UserMetrics::RecordAction(UserMetricsAction("NTPPromoClosed"));
prefs_->SetBoolean(prefs::kNTPPromoClosed, true);
}
bool NotificationPromo::HandleViewed() {
+ UserMetrics::RecordAction(UserMetricsAction("NTPPromoShown"));
if (prefs_->HasPrefPath(prefs::kNTPPromoViewsMax))
max_views_ = prefs_->GetInteger(prefs::kNTPPromoViewsMax);
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698