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

Unified Diff: chrome/browser/history/scored_history_match.cc

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 6 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/history/scored_history_match.cc
diff --git a/chrome/browser/history/scored_history_match.cc b/chrome/browser/history/scored_history_match.cc
index 53565e734fb83c44a9e1aa1a92e4f1f051d3cc63..b5219fe6b894b74e7b99e9e6668cb06594ec90e7 100644
--- a/chrome/browser/history/scored_history_match.cc
+++ b/chrome/browser/history/scored_history_match.cc
@@ -19,8 +19,8 @@
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/autocomplete/url_prefix.h"
#include "chrome/browser/omnibox/omnibox_field_trial.h"
-#include "components/bookmarks/browser/bookmark_service.h"
#include "components/bookmarks/browser/bookmark_utils.h"
+#include "components/history/core/browser/history_client.h"
#include "content/public/browser/browser_thread.h"
namespace history {
@@ -55,7 +55,7 @@ ScoredHistoryMatch::ScoredHistoryMatch(
const WordStarts& terms_to_word_starts_offsets,
const RowWordStarts& word_starts,
const base::Time now,
- BookmarkService* bookmark_service)
+ HistoryClient* history_client)
: HistoryMatch(row, 0, false, false),
raw_score_(0),
can_inline_(false) {
@@ -153,7 +153,7 @@ ScoredHistoryMatch::ScoredHistoryMatch(
const float topicality_score = GetTopicalityScore(
terms.size(), url, terms_to_word_starts_offsets, word_starts);
const float frequency_score = GetFrequency(
- now, (bookmark_service && bookmark_service->IsBookmarked(gurl)), visits);
+ now, (history_client && history_client->IsBookmarked(gurl)), visits);
raw_score_ = GetFinalRelevancyScore(topicality_score, frequency_score);
raw_score_ =
(raw_score_ <= kint32max) ? static_cast<int>(raw_score_) : kint32max;

Powered by Google App Engine
This is Rietveld 408576698