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

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

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Version for commit (merged again). 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
Index: chrome/browser/web_resource/notification_promo.cc
diff --git a/chrome/browser/web_resource/notification_promo.cc b/chrome/browser/web_resource/notification_promo.cc
index e3d12e4d7a327d63b2ea4ef3674a8cdf74211f97..cd6b19b9f972a67cf4eb522af0941ba47c164f4b 100644
--- a/chrome/browser/web_resource/notification_promo.cc
+++ b/chrome/browser/web_resource/notification_promo.cc
@@ -16,11 +16,13 @@
#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 "content/public/browser/user_metrics.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
+using content::UserMetricsAction;
+
namespace {
// Maximum number of views.
@@ -335,12 +337,12 @@ bool NotificationPromo::CanShow() const {
}
void NotificationPromo::HandleClosed() {
- UserMetrics::RecordAction(UserMetricsAction("NTPPromoClosed"));
+ content::RecordAction(UserMetricsAction("NTPPromoClosed"));
prefs_->SetBoolean(prefs::kNTPPromoClosed, true);
}
bool NotificationPromo::HandleViewed() {
- UserMetrics::RecordAction(UserMetricsAction("NTPPromoShown"));
+ content::RecordAction(UserMetricsAction("NTPPromoShown"));
if (prefs_->HasPrefPath(prefs::kNTPPromoViewsMax))
max_views_ = prefs_->GetInteger(prefs::kNTPPromoViewsMax);
« no previous file with comments | « chrome/browser/ui/webui/options/personal_options_handler.cc ('k') | chrome/browser/web_resource/web_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698