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

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

Issue 6976001: Turn on the History Quick Provider by Default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/history_contents_provider.cc
===================================================================
--- chrome/browser/autocomplete/history_contents_provider.cc (revision 85061)
+++ chrome/browser/autocomplete/history_contents_provider.cc (working copy)
@@ -202,15 +202,14 @@
}
}
-static bool MatchInTitle(const history::URLResult& result) {
- return !result.title_match_positions().empty();
+// TODO(mrossetti): Remove MatchInTitle once body_only_ becomes permanent.
+bool HistoryContentsProvider::MatchInTitle(const history::URLResult& result) {
+ return !body_only_ && !result.title_match_positions().empty();
}
AutocompleteMatch HistoryContentsProvider::ResultToMatch(
const history::URLResult& result,
int score) {
- // TODO(sky): if matched title highlight matching words in title.
- // Also show star in popup.
AutocompleteMatch match(this, score, true, MatchInTitle(result) ?
AutocompleteMatch::HISTORY_TITLE : AutocompleteMatch::HISTORY_BODY);
match.contents = StringForURLDisplay(result.url(), true, trim_http_);
« no previous file with comments | « chrome/browser/autocomplete/history_contents_provider.h ('k') | chrome/browser/history/in_memory_history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698