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

Unified Diff: chrome/browser/ui/toolbar/back_forward_menu_model.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/ui/toolbar/back_forward_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 515c57b0f452bf2a0473f89f19657f7501fec583..0fdd35626edf64fb39b92570eacac0ed3bcc1065 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -18,7 +18,7 @@
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/browser/user_metrics.h"
+#include "content/public/browser/user_metrics.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "grit/theme_resources_standard.h"
@@ -28,6 +28,8 @@
#include "ui/base/text/text_elider.h"
#include "ui/gfx/codec/png_codec.h"
+using content::UserMetricsAction;
+
const int BackForwardMenuModel::kMaxHistoryItems = 12;
const int BackForwardMenuModel::kMaxChapterStops = 5;
static const int kMaxWidth = 700;
@@ -167,7 +169,7 @@ void BackForwardMenuModel::ActivatedAt(int index, int event_flags) {
// Execute the command for the last item: "Show Full History".
if (index == GetItemCount() - 1) {
- UserMetrics::RecordComputedAction(BuildActionName("ShowFullHistory", -1));
+ content::RecordComputedAction(BuildActionName("ShowFullHistory", -1));
browser_->ShowSingletonTabOverwritingNTP(
browser_->GetSingletonTabNavigateParams(
GURL(chrome::kChromeUIHistoryURL)));
@@ -176,10 +178,10 @@ void BackForwardMenuModel::ActivatedAt(int index, int event_flags) {
// Log whether it was a history or chapter click.
if (index < GetHistoryItemCount()) {
- UserMetrics::RecordComputedAction(
+ content::RecordComputedAction(
BuildActionName("HistoryClick", index));
} else {
- UserMetrics::RecordComputedAction(
+ content::RecordComputedAction(
BuildActionName("ChapterClick", index - GetHistoryItemCount() - 1));
}
@@ -191,7 +193,7 @@ void BackForwardMenuModel::ActivatedAt(int index, int event_flags) {
}
void BackForwardMenuModel::MenuWillShow() {
- UserMetrics::RecordComputedAction(BuildActionName("Popup", -1));
+ content::RecordComputedAction(BuildActionName("Popup", -1));
requested_favicons_.clear();
load_consumer_.CancelAllRequests();
}
« no previous file with comments | « chrome/browser/ui/search_engines/keyword_editor_controller.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698