diff options
Diffstat (limited to 'chrome/browser/autocomplete/history_quick_provider.cc')
-rw-r--r-- | chrome/browser/autocomplete/history_quick_provider.cc | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc index 5982a71..0ae6b11 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; -} |