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

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: Move to content namespace. Update usages. Update extract_actions tool. 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 c9a9f7e81feaa1028e9cef1f2e8bd811aeef50b5..c6288aeab6423e785a3f7de4995c4bd612413550 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;
@@ -166,7 +168,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)));
@@ -175,10 +177,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));
}
@@ -190,7 +192,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();
}

Powered by Google App Engine
This is Rietveld 408576698