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

Unified Diff: chrome/browser/autocomplete/scored_history_match_builder_impl.h

Issue 959343004: Move InMemoryURLIndex outside of history namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@in-memory-url-index
Patch Set: Rebase Created 5 years, 9 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/scored_history_match_builder_impl.h
diff --git a/chrome/browser/autocomplete/scored_history_match_builder_impl.h b/chrome/browser/autocomplete/scored_history_match_builder_impl.h
index 83cf26918070573af36263fae513034e96537510..658785c36d5544e986ac72fd65700c7626261440 100644
--- a/chrome/browser/autocomplete/scored_history_match_builder_impl.h
+++ b/chrome/browser/autocomplete/scored_history_match_builder_impl.h
@@ -29,8 +29,7 @@ class ScoredHistoryMatchBuilderImplTest;
// influence the final score calculated by the client of this index. If the row
// does not qualify the raw score will be 0. |languages| is used to help
// parse/format the URL before looking for the terms.
-class ScoredHistoryMatchBuilderImpl
- : public history::ScoredHistoryMatch::Builder {
+class ScoredHistoryMatchBuilderImpl : public ScoredHistoryMatch::Builder {
public:
// Returns whether |url| is bookmarked which is used to affect the score. Must
// support being called multiple times.
@@ -47,25 +46,24 @@ class ScoredHistoryMatchBuilderImpl
~ScoredHistoryMatchBuilderImpl() override;
// history::ScoredHistoryMatch implementation.
- history::ScoredHistoryMatch Build(
- const history::URLRow& row,
- const history::VisitInfoVector& visits,
- const std::string& languages,
- const base::string16& lower_string,
- const history::String16Vector& terms_vector,
- const history::WordStarts& terms_to_word_starts_offsets,
- const history::RowWordStarts& word_starts,
- const base::Time now) const override;
+ ScoredHistoryMatch Build(const history::URLRow& row,
+ const VisitInfoVector& visits,
+ const std::string& languages,
+ const base::string16& lower_string,
+ const String16Vector& terms_vector,
+ const WordStarts& terms_to_word_starts_offsets,
+ const RowWordStarts& word_starts,
+ const base::Time now) const override;
// Returns |term_matches| after removing all matches that are not at a
// word break that are in the range [|start_pos|, |end_pos|).
// start_pos == string::npos is treated as start_pos = length of string.
// (In other words, no matches will be filtered.)
// end_pos == string::npos is treated as end_pos = length of string.
- static history::TermMatches FilterTermMatchesByWordStarts(
- const history::TermMatches& term_matches,
- const history::WordStarts& terms_to_word_starts_offsets,
- const history::WordStarts& word_starts,
+ static TermMatches FilterTermMatchesByWordStarts(
+ const TermMatches& term_matches,
+ const WordStarts& terms_to_word_starts_offsets,
+ const WordStarts& word_starts,
size_t start_pos,
size_t end_pos);
@@ -90,9 +88,9 @@ class ScoredHistoryMatchBuilderImpl
static float GetTopicalityScore(
const int num_terms,
const base::string16& cleaned_up_url,
- const history::WordStarts& terms_to_word_starts_offsets,
- const history::RowWordStarts& word_starts,
- history::ScoredHistoryMatch* scored_history_match);
+ const WordStarts& terms_to_word_starts_offsets,
+ const RowWordStarts& word_starts,
+ ScoredHistoryMatch* scored_history_match);
// Returns a recency score based on |last_visit_days_ago|, which is
// how many days ago the page was last visited.
@@ -105,7 +103,7 @@ class ScoredHistoryMatchBuilderImpl
// recomputing it frequently.
static float GetFrequency(const base::Time& now,
const bool bookmarked,
- const history::VisitInfoVector& visits);
+ const VisitInfoVector& visits);
// Combines the two component scores into a final score that's
// an appropriate value to use as a relevancy score. Scoring buckets are
« no previous file with comments | « chrome/browser/autocomplete/scored_history_match.cc ('k') | chrome/browser/autocomplete/scored_history_match_builder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698