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

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

Issue 14259008: Instant Extended: Add prominent search term support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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
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 597cca8b125c8d7e8251d6c8dbbae894189afd7e..fda8ade1127cb6e861ea791faf735a784c23b453 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -391,7 +391,8 @@ bool OmniboxEditModel::UseVerbatimInstant() {
}
bool OmniboxEditModel::CurrentTextIsURL() const {
- if (view_->toolbar_model()->WouldReplaceSearchURLWithSearchTerms())
+ if (view_->toolbar_model()->GetSearchTermsType() !=
+ ToolbarModel::NO_SEARCH_TERMS)
return false;
// If current text is not composed of replaced search terms and
@@ -422,8 +423,9 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min,
// Do not adjust if selection did not start at the beginning of the field, or
// if the URL was replaced by search terms.
- if (sel_min != 0 ||
- view_->toolbar_model()->WouldReplaceSearchURLWithSearchTerms())
+ if ((sel_min != 0) ||
+ (view_->toolbar_model()->GetSearchTermsType() !=
+ ToolbarModel::NO_SEARCH_TERMS))
return;
if (!user_input_in_progress_ && is_all_selected) {
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698