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

Unified Diff: chrome/browser/ui/webui/ntp/most_visited_handler.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
« no previous file with comments | « chrome/browser/ui/webui/metrics_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/most_visited_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index 16cb991dab0834cbbed569e730558e4bb97b02a3..aaa30ee15d48c82733433e13e20abffcee750268 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -30,15 +30,17 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/user_metrics.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/user_metrics.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
+using content::UserMetricsAction;
+
MostVisitedHandler::MostVisitedHandler()
: got_first_most_visited_request_(false) {
}
@@ -146,7 +148,7 @@ void MostVisitedHandler::HandleRemoveURLsFromBlacklist(const ListValue* args) {
NOTREACHED();
return;
}
- UserMetrics::RecordAction(UserMetricsAction("MostVisited_UrlRemoved"));
+ content::RecordAction(UserMetricsAction("MostVisited_UrlRemoved"));
history::TopSites* ts = Profile::FromWebUI(web_ui_)->GetTopSites();
if (ts)
ts->RemoveBlacklistedURL(GURL(url));
@@ -154,7 +156,7 @@ void MostVisitedHandler::HandleRemoveURLsFromBlacklist(const ListValue* args) {
}
void MostVisitedHandler::HandleClearBlacklist(const ListValue* args) {
- UserMetrics::RecordAction(UserMetricsAction("MostVisited_BlacklistCleared"));
+ content::RecordAction(UserMetricsAction("MostVisited_BlacklistCleared"));
history::TopSites* ts = Profile::FromWebUI(web_ui_)->GetTopSites();
if (ts)
@@ -201,7 +203,7 @@ void MostVisitedHandler::BlacklistURL(const GURL& url) {
history::TopSites* ts = Profile::FromWebUI(web_ui_)->GetTopSites();
if (ts)
ts->AddBlacklistedURL(url);
- UserMetrics::RecordAction(UserMetricsAction("MostVisited_UrlBlacklisted"));
+ content::RecordAction(UserMetricsAction("MostVisited_UrlBlacklisted"));
}
std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) {
« no previous file with comments | « chrome/browser/ui/webui/metrics_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698