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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 10879043: Centralize logic around Instant modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Directly call into SearchProvider Created 8 years, 4 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/instant/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/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 3b1cd78c544051287ce9a022468e35901a3abe5e..6c679afacf43ea58fe5fdcd908c755a15058fa76 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -430,6 +430,11 @@ void OmniboxEditModel::StartAutocomplete(
popup_->SetHoveredLine(OmniboxPopupModel::kNoMatch);
// We don't explicitly clear OmniboxPopupModel::manually_selected_match, as
// Start ends up invoking OmniboxPopupModel::OnResultChanged which clears it.
+ SearchProvider* search_provider = autocomplete_controller_->search_provider();
+ if (search_provider) {
+ search_provider->set_instant_suggest_enabled(controller_->GetInstant() &&
sky 2012/08/24 19:11:52 Don't you need to NULL check instant?
sreeram 2012/08/24 19:15:29 Correct. Isn't that what the "&&" is doing? GetIns
+ controller_->GetInstant()->IsSuggestEnabled());
+ }
autocomplete_controller_->Start(
user_text_, GetDesiredTLD(),
prevent_inline_autocomplete || just_deleted_text_ ||
« no previous file with comments | « chrome/browser/instant/instant_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698