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

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

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 d7ced3d12dc65b3f8529d6eb7cc08f9633d1d744..ae74260465b1d0a1b4a7ab79ee6ac3e6fc03129e 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -88,7 +88,6 @@ enum UserTextClearedType {
} // namespace
-
///////////////////////////////////////////////////////////////////////////////
// OmniboxEditModel::State
@@ -232,7 +231,7 @@ void OmniboxEditModel::SetInstantSuggestion(
break;
case INSTANT_COMPLETE_NEVER:
- DCHECK_EQ(INSTANT_SUGGESTION_SEARCH, suggestion.type);
+ DCHECK(!suggestion.is_url);
view_->SetInstantSuggestion(suggestion.text);
break;
@@ -263,7 +262,7 @@ bool OmniboxEditModel::CommitSuggestedText(bool skip_inline_autocomplete) {
FinalizeInstantQuery(view_->GetText(),
InstantSuggestion(suggestion,
INSTANT_COMPLETE_NOW,
- INSTANT_SUGGESTION_SEARCH),
+ false),
skip_inline_autocomplete);
return true;
}
@@ -1299,8 +1298,8 @@ bool OmniboxEditModel::DoInstant(const AutocompleteMatch& match) {
if (!instant || in_revert_)
return false;
- // Don't call Update() if the change is a result of a
- // INSTANT_COMPLETE_REPLACE instant suggestion.
+ // Don't call Update() if the change is a result of an
+ // INSTANT_COMPLETE_REPLACE Instant suggestion.
if (has_temporary_text_ && is_temporary_text_set_by_instant_)
return false;
@@ -1321,7 +1320,7 @@ bool OmniboxEditModel::DoInstant(const AutocompleteMatch& match) {
return instant->Update(match, user_text, full_text, start, end,
UseVerbatimInstant(), user_input_in_progress_, popup_->IsOpen(),
- in_escape_handler_, KeywordIsSelected());
+ in_escape_handler_);
}
void OmniboxEditModel::DoPrerender(const AutocompleteMatch& match) {

Powered by Google App Engine
This is Rietveld 408576698