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

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 13839011: Asynchronous initialization in Simple Index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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: net/disk_cache/simple/simple_backend_impl.cc
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index fba0b5a9728eb6ead2535db10254605eaafc5261..cb552c212a969abda17e99e6ea53231a687e5ed0 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -69,7 +69,7 @@ int SimpleBackendImpl::CreateBackend(
}
SimpleBackendImpl::~SimpleBackendImpl() {
- index_->Cleanup();
+ index_->WriteToDisk();
}
net::CacheType SimpleBackendImpl::GetCacheType() const {
@@ -143,7 +143,9 @@ void SimpleBackendImpl::OnExternalCacheHit(const std::string& key) {
SimpleBackendImpl::SimpleBackendImpl(
const scoped_refptr<base::TaskRunner>& cache_thread,
const FilePath& path) : path_(path) {
- index_.reset(new SimpleIndex(cache_thread, path));
+ index_.reset(new SimpleIndex(cache_thread,
+ MessageLoopProxy::current(), // io_thread
+ path));
}
void SimpleBackendImpl::Initialize() {
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_disk_format.h » ('j') | net/disk_cache/simple/simple_disk_format.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698