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

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

Issue 2885853002: Instant: remove InstantSupportState (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/search/instant_tab_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 940805bcbde1f9aac724bd31b5a902e2a5eae9c1..b72ee830d77a63fc421535f6954ee02d8ff68f06 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -150,20 +150,15 @@ void BrowserInstantController::TabDeactivated(content::WebContents* contents) {
prerenderer->Cancel();
}
-void BrowserInstantController::ModelChanged(
- const SearchModel::State& old_state,
- const SearchModel::State& new_state) {
- if (old_state.mode != new_state.mode) {
- const SearchMode& new_mode = new_state.mode;
-
- // Record some actions corresponding to the mode change. Note that to get
- // the full story, it's necessary to look at other UMA actions as well,
- // such as tab switches.
- if (new_mode.is_ntp())
- base::RecordAction(base::UserMetricsAction("InstantExtended.ShowNTP"));
-
- instant_.SearchModeChanged(old_state.mode, new_mode);
- }
+void BrowserInstantController::ModelChanged(const SearchMode& old_mode,
+ const SearchMode& new_mode) {
+ // Record some actions corresponding to the mode change. Note that to get
+ // the full story, it's necessary to look at other UMA actions as well,
+ // such as tab switches.
+ if (new_mode.is_ntp())
+ base::RecordAction(base::UserMetricsAction("InstantExtended.ShowNTP"));
+
+ instant_.SearchModeChanged(old_mode, new_mode);
}
void BrowserInstantController::DefaultSearchProviderChanged(
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/search/instant_tab_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698