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

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

Issue 77453007: Omnibox: Make HistoryURL Highlight Titles like HistoryQuick Provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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_quick_provider.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 5982a71f07e03052030ef2233600468b0e60d886..0ae6b11027911edbbbdb9aa4ad577633ef0c7de9 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -316,35 +316,3 @@ history::InMemoryURLIndex* HistoryQuickProvider::GetIndex() {
return history_service->InMemoryIndex();
}
-
-// static
-ACMatchClassifications HistoryQuickProvider::SpansFromTermMatch(
- const history::TermMatches& matches,
- size_t text_length,
- bool is_url) {
- ACMatchClassification::Style url_style =
- is_url ? ACMatchClassification::URL : ACMatchClassification::NONE;
- ACMatchClassifications spans;
- if (matches.empty()) {
- if (text_length)
- spans.push_back(ACMatchClassification(0, url_style));
- return spans;
- }
- if (matches[0].offset)
- spans.push_back(ACMatchClassification(0, url_style));
- size_t match_count = matches.size();
- for (size_t i = 0; i < match_count;) {
- size_t offset = matches[i].offset;
- spans.push_back(ACMatchClassification(offset,
- ACMatchClassification::MATCH | url_style));
- // Skip all adjacent matches.
- do {
- offset += matches[i].length;
- ++i;
- } while ((i < match_count) && (offset == matches[i].offset));
- if (offset < text_length)
- spans.push_back(ACMatchClassification(offset, url_style));
- }
-
- return spans;
-}
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider.h ('k') | chrome/browser/autocomplete/history_url_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698