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

Unified Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 6268005: Removes the link in the omnibox for searching history. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 11 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/autocomplete/autocomplete_match.cc
diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc
index 57d57cdc13daee94276cbe8bed31b3bee40816fe..353cfad7346bc8d93729c56e26edd826abdc4ee1 100644
--- a/chrome/browser/autocomplete/autocomplete_match.cc
+++ b/chrome/browser/autocomplete/autocomplete_match.cc
@@ -51,7 +51,6 @@ std::string AutocompleteMatch::TypeToString(Type type) {
"search-history",
"search-suggest",
"search-other-engine",
- "open-history-page",
};
DCHECK(arraysize(strings) == NUM_TYPES);
return strings[type];
@@ -70,7 +69,6 @@ int AutocompleteMatch::TypeToIcon(Type type) {
IDR_OMNIBOX_SEARCH,
IDR_OMNIBOX_SEARCH,
IDR_OMNIBOX_SEARCH,
- IDR_OMNIBOX_MORE,
};
DCHECK(arraysize(icons) == NUM_TYPES);
return icons[type];
@@ -85,12 +83,7 @@ bool AutocompleteMatch::MoreRelevant(const AutocompleteMatch& elem1,
if (elem1.relevance == elem2.relevance)
return elem1.contents > elem2.contents;
- // A negative relevance indicates the real relevance can be determined by
- // negating the value. If both relevances are negative, negate the result
- // so that we end up with positive relevances, then negative relevances with
- // the negative relevances sorted by absolute values.
- const bool result = elem1.relevance > elem2.relevance;
- return (elem1.relevance < 0 && elem2.relevance < 0) ? !result : result;
+ return elem1.relevance > elem2.relevance;
}
// static

Powered by Google App Engine
This is Rietveld 408576698