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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 months 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/bookmarks/bookmark_context_menu_controller.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
index 49242ccc138a412fadc87458c94f5d89445e9a70..c458e03c0829524481653ee95958a0244c6b8b22 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/metrics/user_metrics.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
@@ -31,7 +32,6 @@
#include "components/strings/grit/components_strings.h"
#include "components/undo/bookmark_undo_service.h"
#include "content/public/browser/page_navigator.h"
-#include "content/public/browser/user_metrics.h"
#include "ui/base/l10n/l10n_util.h"
using base::UserMetricsAction;
@@ -146,15 +146,15 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
WindowOpenDisposition initial_disposition;
if (id == IDC_BOOKMARK_BAR_OPEN_ALL) {
initial_disposition = WindowOpenDisposition::NEW_BACKGROUND_TAB;
- content::RecordAction(
+ base::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_OpenAll"));
} else if (id == IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW) {
initial_disposition = WindowOpenDisposition::NEW_WINDOW;
- content::RecordAction(
+ base::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_OpenAllInNewWindow"));
} else {
initial_disposition = WindowOpenDisposition::OFF_THE_RECORD;
- content::RecordAction(
+ base::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_OpenAllIncognito"));
}
chrome::OpenAll(parent_window_, navigator_, selection_,
@@ -164,8 +164,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
case IDC_BOOKMARK_BAR_RENAME_FOLDER:
case IDC_BOOKMARK_BAR_EDIT:
- content::RecordAction(
- UserMetricsAction("BookmarkBar_ContextMenu_Edit"));
+ base::RecordAction(UserMetricsAction("BookmarkBar_ContextMenu_Edit"));
if (selection_.size() != 1) {
NOTREACHED();
@@ -181,24 +180,21 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
break;
case IDC_BOOKMARK_BAR_UNDO: {
- content::RecordAction(
- UserMetricsAction("BookmarkBar_ContextMenu_Undo"));
+ base::RecordAction(UserMetricsAction("BookmarkBar_ContextMenu_Undo"));
BookmarkUndoServiceFactory::GetForProfile(profile_)->undo_manager()->
Undo();
break;
}
case IDC_BOOKMARK_BAR_REDO: {
- content::RecordAction(
- UserMetricsAction("BookmarkBar_ContextMenu_Redo"));
+ base::RecordAction(UserMetricsAction("BookmarkBar_ContextMenu_Redo"));
BookmarkUndoServiceFactory::GetForProfile(profile_)->undo_manager()->
Redo();
break;
}
case IDC_BOOKMARK_BAR_REMOVE: {
- content::RecordAction(
- UserMetricsAction("BookmarkBar_ContextMenu_Remove"));
+ base::RecordAction(UserMetricsAction("BookmarkBar_ContextMenu_Remove"));
for (size_t i = 0; i < selection_.size(); ++i) {
int index = selection_[i]->parent()->GetIndexOf(selection_[i]);
@@ -210,8 +206,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
}
case IDC_BOOKMARK_BAR_ADD_NEW_BOOKMARK: {
- content::RecordAction(
- UserMetricsAction("BookmarkBar_ContextMenu_Add"));
+ base::RecordAction(UserMetricsAction("BookmarkBar_ContextMenu_Add"));
int index;
const BookmarkNode* parent =
@@ -230,7 +225,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
}
case IDC_BOOKMARK_BAR_NEW_FOLDER: {
- content::RecordAction(
+ base::RecordAction(
UserMetricsAction("BookmarkBar_ContextMenu_NewFolder"));
int index;
@@ -266,7 +261,7 @@ void BookmarkContextMenuController::ExecuteCommand(int id, int event_flags) {
}
case IDC_BOOKMARK_MANAGER: {
- content::RecordAction(UserMetricsAction("ShowBookmarkManager"));
+ base::RecordAction(UserMetricsAction("ShowBookmarkManager"));
if (selection_.size() != 1)
chrome::ShowBookmarkManager(browser_);
else if (selection_[0]->is_folder())

Powered by Google App Engine
This is Rietveld 408576698