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

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: Fix tests 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
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();
Peter Kasting 2012/08/24 22:29:52 This seems like a strange place for this code. It
sreeram 2012/08/24 23:18:12 The Instant mode changes happen at the chrome/ui/b
Peter Kasting 2012/08/24 23:25:44 What about having the SearchProvider reach out and
sreeram 2012/08/24 23:38:58 That's exactly what I had done in patchset 1. Scot
+ if (search_provider) {
+ search_provider->set_instant_suggest_enabled(controller_->GetInstant() &&
+ controller_->GetInstant()->IsSuggestEnabled());
+ }
autocomplete_controller_->Start(
user_text_, GetDesiredTLD(),
prevent_inline_autocomplete || just_deleted_text_ ||
« chrome/browser/instant/instant_controller.h ('K') | « chrome/browser/instant/instant_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698