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

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

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android 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/in_memory_url_index.cc
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index 029e56af86f377d95f2c61e7bfe3101de223fe71..a5c1c4716097d536b8749e5549bca4c318259184 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -90,8 +90,10 @@ InMemoryURLIndex::RebuildPrivateDataFromHistoryDBTask::
InMemoryURLIndex::InMemoryURLIndex(Profile* profile,
const base::FilePath& history_dir,
- const std::string& languages)
+ const std::string& languages,
+ HistoryClient* history_client)
: profile_(profile),
+ history_client_(history_client),
history_dir_(history_dir),
languages_(languages),
private_data_(new URLIndexPrivateData),
@@ -114,6 +116,7 @@ InMemoryURLIndex::InMemoryURLIndex(Profile* profile,
// Called only by unit tests.
InMemoryURLIndex::InMemoryURLIndex()
: profile_(NULL),
+ history_client_(NULL),
private_data_(new URLIndexPrivateData),
restore_cache_observer_(NULL),
save_cache_observer_(NULL),
@@ -167,7 +170,7 @@ ScoredHistoryMatches InMemoryURLIndex::HistoryItemsForTerms(
cursor_position,
max_matches,
languages_,
- BookmarkModelFactory::GetForProfile(profile_));
+ history_client_);
}
// Updating --------------------------------------------------------------------
« no previous file with comments | « chrome/browser/history/in_memory_url_index.h ('k') | chrome/browser/history/in_memory_url_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698