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

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

Issue 12706012: chromeos: Destruct DriveResourceMetadata on the blocking pool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add note Created 7 years, 9 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/chromeos/drive/search_metadata_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
diff --git a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
index 113310368975b4d1a348e9278c67e8b7c3236881..491fad076dc0ed7c80f5e2ba856909a39c55be84 100644
--- a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
+++ b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
@@ -73,16 +73,15 @@ class StaleCacheFilesRemoverTest : public testing::Test {
pool->GetSequencedTaskRunner(pool->GetSequenceToken());
// Likewise, this will be owned by DriveFileSystem.
- cache_ = new DriveCache(
- DriveCache::GetCacheRootPath(profile_.get()),
- blocking_task_runner_,
- fake_free_disk_space_getter_.get());
+ cache_.reset(new DriveCache(DriveCache::GetCacheRootPath(profile_.get()),
+ blocking_task_runner_,
+ fake_free_disk_space_getter_.get()));
drive_webapps_registry_.reset(new DriveWebAppsRegistry);
ASSERT_FALSE(file_system_);
file_system_ = new DriveFileSystem(profile_.get(),
- cache_,
+ cache_.get(),
fake_drive_service_.get(),
NULL, // drive_uploader
drive_webapps_registry_.get(),
@@ -98,7 +97,7 @@ class StaleCacheFilesRemoverTest : public testing::Test {
cache_->RequestInitializeForTesting();
stale_cache_files_remover_.reset(new StaleCacheFilesRemover(file_system_,
- cache_));
+ cache_.get()));
google_apis::test_util::RunBlockingPoolTask();
}
@@ -108,7 +107,7 @@ class StaleCacheFilesRemoverTest : public testing::Test {
stale_cache_files_remover_.reset();
delete file_system_;
file_system_ = NULL;
- test_util::DeleteDriveCache(cache_);
+ cache_.reset();
profile_.reset(NULL);
}
@@ -118,7 +117,7 @@ class StaleCacheFilesRemoverTest : public testing::Test {
content::TestBrowserThread ui_thread_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
scoped_ptr<TestingProfile> profile_;
- DriveCache* cache_;
+ scoped_ptr<DriveCache, test_util::DestroyHelperForTests> cache_;
DriveFileSystem* file_system_;
scoped_ptr<google_apis::FakeDriveService> fake_drive_service_;
scoped_ptr<DriveWebAppsRegistry> drive_webapps_registry_;
« no previous file with comments | « chrome/browser/chromeos/drive/search_metadata_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698