Index: chrome/browser/chromeos/gdata/gdata_cache.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.cc b/chrome/browser/chromeos/gdata/gdata_cache.cc |
index 6b2efb326d501475a755d3341c40fe6c673eae06..32af36bb8ddacf015e60d388db40fb46876b02c2 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_cache.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_cache.cc |
@@ -324,7 +324,8 @@ GDataCache::GDataCache(const FilePath& cache_root_path, |
: cache_root_path_(cache_root_path), |
cache_paths_(GetCachePaths(cache_root_path_)), |
blocking_task_runner_(blocking_task_runner), |
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
+ weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
+ force_metadata_map_for_testing_(false) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
} |
@@ -748,7 +749,7 @@ void GDataCache::Initialize() { |
InitCachePaths(cache_paths_); |
metadata_ = GDataCacheMetadata::CreateGDataCacheMetadata( |
- blocking_task_runner_).Pass(); |
+ blocking_task_runner_, force_metadata_map_for_testing_).Pass(); |
metadata_->Initialize(cache_paths_); |
} |
@@ -1524,6 +1525,10 @@ void GDataCache::GetCacheEntryHelper(const std::string& resource_id, |
*success = GetCacheEntry(resource_id, md5, cache_entry); |
} |
+void GDataCache::ForceMetadataMapForTesting() { |
+ force_metadata_map_for_testing_ = true; |
+} |
+ |
// static |
FilePath GDataCache::GetCacheRootPath(Profile* profile) { |
FilePath cache_base_path; |