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

Unified Diff: chrome/browser/chromeos/drive/file_cache.cc

Issue 16338005: drive: Remove FakeCacheMetadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/chromeos/drive/file_cache.cc
diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc
index f1e9c599e7b44a23c38fdda00af9979c324d27a0..a8792922b650943d256b386356fdf665fd4f813a 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -680,15 +680,6 @@ void FileCache::RequestInitialize(const InitializeCacheCallback& callback) {
callback);
}
-void FileCache::RequestInitializeForTesting() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- blocking_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&FileCache::InitializeOnBlockingPoolForTesting,
- base::Unretained(this)));
-}
-
void FileCache::Destroy() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -709,20 +700,10 @@ bool FileCache::InitializeOnBlockingPool() {
if (!InitCachePaths(cache_paths_))
return false;
- metadata_ = FileCacheMetadata::CreateCacheMetadata(
- blocking_task_runner_);
+ metadata_.reset(new FileCacheMetadata(blocking_task_runner_));
return metadata_->Initialize(cache_paths_);
}
-void FileCache::InitializeOnBlockingPoolForTesting() {
- AssertOnSequencedWorkerPool();
-
- InitCachePaths(cache_paths_);
- metadata_ = FileCacheMetadata::CreateCacheMetadataForTesting(
- blocking_task_runner_);
- metadata_->Initialize(cache_paths_);
-}
-
void FileCache::DestroyOnBlockingPool() {
AssertOnSequencedWorkerPool();
delete this;

Powered by Google App Engine
This is Rietveld 408576698