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

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: 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..2a1f5bf735721625a2c1f8dc77b6ea74ba7a9a12 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -391,8 +391,10 @@ bool OmniboxEditModel::UseVerbatimInstant() {
}
bool OmniboxEditModel::CurrentTextIsURL() const {
- if (view_->toolbar_model()->WouldReplaceSearchURLWithSearchTerms())
+ if (view_->toolbar_model()->GetSearchTermType() !=
+ ToolbarModel::SEARCH_TERM_NONE) {
return false;
+ }
sreeram 2013/04/23 22:56:45 Nit: no curlies. I believe the style is to put cur
sail 2013/04/24 00:22:23 Done.
// If current text is not composed of replaced search terms and
// !user_input_in_progress_, then permanent text is showing and should be a
@@ -422,9 +424,10 @@ 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()->GetSearchTermType() !=
+ ToolbarModel::SEARCH_TERM_NONE) {
sreeram 2013/04/23 22:56:45 Nit: No curlies. Maybe also indent line 428 four m
sail 2013/04/24 00:22:23 Done. (Kept the indentation so that I don't have t
return;
+ }
if (!user_input_in_progress_ && is_all_selected) {
// The user selected all the text and has not edited it. Use the url as the

Powered by Google App Engine
This is Rietveld 408576698