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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 272573004: Handle TemplateURLService load failure better, and make some test correctness fixes that will be ne… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after revert / presubmit fixes. Created 6 years, 7 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/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index d1d8e92bacc7cbaceafe2dd5b7ac894afa35f811..3e95e325a1a2cafeddc3491ca24746dc1a52075e 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -26,7 +26,8 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-using base::UserMetricsAction;
+
+// Helpers --------------------------------------------------------------------
namespace {
@@ -39,8 +40,8 @@ InstantSearchPrerenderer* GetInstantSearchPrerenderer(Profile* profile) {
} // namespace
-////////////////////////////////////////////////////////////////////////////////
-// BrowserInstantController, public:
+
+// BrowserInstantController ---------------------------------------------------
BrowserInstantController::BrowserInstantController(Browser* browser)
: browser_(browser),
@@ -119,9 +120,6 @@ void BrowserInstantController::TabDeactivated(content::WebContents* contents) {
prerenderer->Cancel();
}
-////////////////////////////////////////////////////////////////////////////////
-// BrowserInstantController, SearchModelObserver implementation:
-
void BrowserInstantController::ModelChanged(
const SearchModel::State& old_state,
const SearchModel::State& new_state) {
@@ -132,9 +130,9 @@ void BrowserInstantController::ModelChanged(
// the full story, it's necessary to look at other UMA actions as well,
// such as tab switches.
if (new_mode.is_search_results())
- content::RecordAction(UserMetricsAction("InstantExtended.ShowSRP"));
+ content::RecordAction(base::UserMetricsAction("InstantExtended.ShowSRP"));
else if (new_mode.is_ntp())
- content::RecordAction(UserMetricsAction("InstantExtended.ShowNTP"));
+ content::RecordAction(base::UserMetricsAction("InstantExtended.ShowNTP"));
instant_.SearchModeChanged(old_state.mode, new_mode);
}
@@ -143,18 +141,7 @@ void BrowserInstantController::ModelChanged(
instant_.InstantSupportChanged(new_state.instant_support);
}
-////////////////////////////////////////////////////////////////////////////////
-// BrowserInstantController, InstantServiceObserver implementation:
-
void BrowserInstantController::DefaultSearchProviderChanged() {
- ReloadTabsInInstantProcess();
-}
-
-void BrowserInstantController::GoogleURLUpdated() {
- ReloadTabsInInstantProcess();
-}
-
-void BrowserInstantController::ReloadTabsInInstantProcess() {
InstantService* instant_service =
InstantServiceFactory::GetForProfile(profile());
if (!instant_service)
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_instant_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698