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

Unified Diff: chrome/browser/ui/webui/ntp/android/navigation_handler.cc

Issue 259393006: Remove WebUI NTP on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/webui/ntp/android/navigation_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/android/navigation_handler.cc b/chrome/browser/ui/webui/ntp/android/navigation_handler.cc
deleted file mode 100644
index 2a99dc0f7b19b916f5db8cf08bb3d528a2d1e887..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/webui/ntp/android/navigation_handler.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/webui/ntp/android/navigation_handler.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/metrics/histogram.h"
-#include "base/values.h"
-#include "chrome/browser/google/google_util.h"
-#include "chrome/common/url_constants.h"
-#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/user_metrics.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_ui.h"
-#include "content/public/common/page_transition_types.h"
-
-using base::UserMetricsAction;
-
-NavigationHandler::NavigationHandler() {}
-
-NavigationHandler::~NavigationHandler() {}
-
-void NavigationHandler::RegisterMessages() {
- web_ui()->RegisterMessageCallback(
- "openedMostVisited",
- base::Bind(&NavigationHandler::HandleOpenedMostVisited,
- base::Unretained(this)));
- web_ui()->RegisterMessageCallback(
- "openedRecentlyClosed",
- base::Bind(&NavigationHandler::HandleOpenedRecentlyClosed,
- base::Unretained(this)));
- web_ui()->RegisterMessageCallback(
- "openedBookmark",
- base::Bind(&NavigationHandler::HandleOpenedBookmark,
- base::Unretained(this)));
- web_ui()->RegisterMessageCallback(
- "openedForeignSession",
- base::Bind(&NavigationHandler::HandleOpenedForeignSession,
- base::Unretained(this)));
-}
-
-void NavigationHandler::HandleOpenedMostVisited(const base::ListValue* args) {
- content::RecordAction(UserMetricsAction("MobileNTPMostVisited"));
- RecordAction(ACTION_OPENED_MOST_VISITED_ENTRY);
-}
-
-void NavigationHandler::HandleOpenedRecentlyClosed(
- const base::ListValue* args) {
- content::RecordAction(UserMetricsAction("MobileNTPRecentlyClosed"));
- RecordAction(ACTION_OPENED_RECENTLY_CLOSED_ENTRY);
-}
-
-void NavigationHandler::HandleOpenedBookmark(const base::ListValue* args) {
- content::RecordAction(UserMetricsAction("MobileNTPBookmark"));
- RecordAction(ACTION_OPENED_BOOKMARK);
-}
-
-void NavigationHandler::HandleOpenedForeignSession(
- const base::ListValue* args) {
- content::RecordAction(UserMetricsAction("MobileNTPForeignSession"));
- RecordAction(ACTION_OPENED_FOREIGN_SESSION);
-}
-
-// static
-void NavigationHandler::RecordAction(Action action) {
- UMA_HISTOGRAM_ENUMERATION("NewTabPage.ActionAndroid", action, NUM_ACTIONS);
-}

Powered by Google App Engine
This is Rietveld 408576698