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

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

Issue 976423002: Remove ScoreHistoryMatch::Builder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cpplint
Patch Set: Address comments 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/history_quick_provider.cc
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 126505fe13d4d2b43bc7b46210c715da3c7b6ab9..68cd805af91c950a9f5f13a6dfd9cf22509c1c02 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -21,7 +21,6 @@
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/autocomplete/in_memory_url_index.h"
#include "chrome/browser/autocomplete/in_memory_url_index_types.h"
-#include "chrome/browser/autocomplete/scored_history_match_builder_impl.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -46,16 +45,6 @@
#include "url/url_parse.h"
#include "url/url_util.h"
-namespace {
-
-// Returns whether |url| is bookmarked in |bookmark_model| (which can be null
-// during testing). Used for ScoredHistoryMatchBuilderImpl.
-bool IsBookmarked(bookmarks::BookmarkModel* bookmark_model, const GURL& url) {
- return bookmark_model && bookmark_model->IsBookmarked(url);
-}
-
-} // namespace
-
bool HistoryQuickProvider::disabled_ = false;
HistoryQuickProvider::HistoryQuickProvider(
@@ -97,19 +86,14 @@ void HistoryQuickProvider::Start(const AutocompleteInput& input,
}
}
-HistoryQuickProvider::~HistoryQuickProvider() {}
+HistoryQuickProvider::~HistoryQuickProvider() {
+}
void HistoryQuickProvider::DoAutocomplete() {
// Get the matching URLs from the DB.
- ScoredHistoryMatches matches;
- {
- ScoredHistoryMatchBuilderImpl builder(base::Bind(
- &IsBookmarked,
- base::Unretained(BookmarkModelFactory::GetForProfile(profile_))));
- matches = in_memory_url_index_->HistoryItemsForTerms(
- autocomplete_input_.text(), autocomplete_input_.cursor_position(),
- AutocompleteProvider::kMaxMatches, builder);
- }
+ ScoredHistoryMatches matches = in_memory_url_index_->HistoryItemsForTerms(
+ autocomplete_input_.text(), autocomplete_input_.cursor_position(),
+ AutocompleteProvider::kMaxMatches);
if (matches.empty())
return;
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_url_provider.cc » ('j') | chrome/browser/autocomplete/scored_history_match.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698