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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 2847083002: Remove InstantController::InstantSupportChanged (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/ui/search/instant_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 80a1f12e8a0947a2007bf49fcdc057371eed5a75..24b2059411be652d25c5becc1cd44e9ad13e8107 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -62,17 +62,6 @@ void InstantController::ClearDebugEvents() {
debug_events_.clear();
}
-void InstantController::InstantSupportChanged(
- InstantSupportState instant_support) {
- // Handle INSTANT_SUPPORT_YES here because InstantTab is not hooked up to the
- // active tab. Search model changed listener in InstantTab will handle other
- // cases.
- if (instant_support != INSTANT_SUPPORT_YES)
- return;
-
- ResetInstantTab();
-}
-
void InstantController::InstantTabAboutToNavigateMainFrame(
const content::WebContents* contents,
const GURL& url) {
@@ -80,6 +69,7 @@ void InstantController::InstantTabAboutToNavigateMainFrame(
// The Instant tab navigated. Send it the data it needs to display
// properly.
+ // TODO(treib): Doesn't seem to be necessary. crbug.com/627747
UpdateInfoForInstantTab();
}
@@ -97,13 +87,11 @@ void InstantController::ResetInstantTab() {
}
void InstantController::UpdateInfoForInstantTab() {
- if (instant_tab_) {
- // Update theme details.
- InstantService* instant_service = GetInstantService();
- if (instant_service) {
- instant_service->UpdateThemeInfo();
- instant_service->UpdateMostVisitedItemsInfo();
- }
+ DCHECK(instant_tab_);
+ InstantService* instant_service = GetInstantService();
+ if (instant_service) {
+ instant_service->UpdateThemeInfo();
+ instant_service->UpdateMostVisitedItemsInfo();
}
}
« no previous file with comments | « chrome/browser/ui/search/instant_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698