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

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

Issue 849323002: Componentize HistoryDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compilation Created 5 years, 11 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
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | chrome/browser/history/history_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 8eb490b1e3cabeb456312a309f616a7c760edf5e..b59a6232e3c54983cfada0b8beac9466b60dbb84 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -47,6 +47,7 @@
#include "components/dom_distiller/core/url_constants.h"
#include "components/history/core/browser/download_row.h"
#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/history_database_params.h"
#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/in_memory_database.h"
@@ -991,7 +992,9 @@ void HistoryService::RebuildTable(
ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::IterateURLs, enumerator);
}
-bool HistoryService::Init(const base::FilePath& history_dir, bool no_db) {
+bool HistoryService::Init(
+ bool no_db,
+ const history::HistoryDatabaseParams& history_database_params) {
DCHECK(thread_) << "History service being called after cleanup";
DCHECK(thread_checker_.CalledOnValidThread());
base::Thread::Options options;
@@ -1001,7 +1004,7 @@ bool HistoryService::Init(const base::FilePath& history_dir, bool no_db) {
return false;
}
- history_dir_ = history_dir;
+ history_dir_ = history_database_params.history_dir;
no_db_ = no_db;
if (profile_) {
@@ -1028,7 +1031,9 @@ bool HistoryService::Init(const base::FilePath& history_dir, bool no_db) {
PrefService* prefs = profile_->GetPrefs();
languages = prefs->GetString(prefs::kAcceptLanguages);
}
- ScheduleAndForget(PRIORITY_UI, &HistoryBackend::Init, languages, no_db_);
+
+ ScheduleAndForget(PRIORITY_UI, &HistoryBackend::Init, languages, no_db_,
+ history_database_params);
if (visitedlink_master_) {
bool result = visitedlink_master_->Init();
« no previous file with comments | « chrome/browser/history/history_service.h ('k') | chrome/browser/history/history_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698