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

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

Issue 15755011: InstantExtended: better handling of switching between tab and overlay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 | « no previous file | 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 e6e9bdd305e8cc1066c573e052653baed6c1c59a..aef643dc9785c579776f1d391eba1f74c6050ea5 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -294,14 +294,12 @@ InstantController::~InstantController() {
}
void InstantController::OnAutocompleteStart() {
- if (instant_tab_ && instant_tab_->supports_instant()) {
+ if (UseTabForSuggestions() && instant_tab_->supports_instant()) {
LOG_INSTANT_DEBUG_EVENT(
this, "OnAutocompleteStart: using InstantTab");
return;
}
- use_tab_for_suggestions_ = false;
-
// Not using |instant_tab_|. Check if overlay is OK to use.
InstantFallbackReason fallback_reason = ShouldSwitchToLocalOverlay();
if (fallback_reason != INSTANT_FALLBACK_NONE) {
@@ -313,6 +311,7 @@ void InstantController::OnAutocompleteStart() {
LOG_INSTANT_DEBUG_EVENT(
this, "OnAutocompleteStart: using existing overlay");
}
+ use_tab_for_suggestions_ = false;
}
bool InstantController::Update(const AutocompleteMatch& match,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698