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

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

Issue 934083003: Cleanup HistoryService and HistoryBackend interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@android-backend-provider
Patch Set: Created 5 years, 10 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/history_service.cc
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index a14daae0f0c21e2c21e430eced6b967c5408313b..3ead68b1b2474cc303eaaf92baf6c96f98d7abeb 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/history/in_memory_url_index.h"
-#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/history/core/browser/download_row.h"
@@ -194,7 +193,6 @@ HistoryService::HistoryService()
: thread_(new base::Thread(kHistoryThreadName)),
history_client_(nullptr),
backend_loaded_(false),
- no_db_(false),
weak_ptr_factory_(this) {
}
@@ -205,7 +203,6 @@ HistoryService::HistoryService(
visit_delegate_(visit_delegate.Pass()),
history_client_(history_client),
backend_loaded_(false),
- no_db_(false),
weak_ptr_factory_(this) {
}
@@ -939,27 +936,24 @@ bool HistoryService::Init(
return false;
}
- history_dir_ = history_database_params.history_dir;
- no_db_ = no_db;
-
if (!languages.empty()) {
// Do not create |in_memory_url_index_| when languages is empty (which
// should only happens during testing).
- in_memory_url_index_.reset(
- new history::InMemoryURLIndex(this, history_dir_, languages));
+ in_memory_url_index_.reset(new history::InMemoryURLIndex(
+ this, history_database_params.history_dir, languages));
in_memory_url_index_->Init();
}
// Create the history backend.
scoped_refptr<HistoryBackend> backend(new HistoryBackend(
- history_dir_, new BackendDelegate(weak_ptr_factory_.GetWeakPtr(),
- base::ThreadTaskRunnerHandle::Get()),
+ new BackendDelegate(weak_ptr_factory_.GetWeakPtr(),
+ base::ThreadTaskRunnerHandle::Get()),
history_client_));
history_backend_.swap(backend);
ScheduleTask(PRIORITY_UI,
base::Bind(&HistoryBackend::Init, history_backend_.get(),
- languages, no_db_, history_database_params));
+ languages, no_db, history_database_params));
if (visit_delegate_ && !visit_delegate_->Init(this))
return false;

Powered by Google App Engine
This is Rietveld 408576698