| 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 3af5532639fed9812cd2012789168f589f731d85..036e33bc6e0a9cd1c041574ab76984749c5ea4a6 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_cache.cc
|
| +++ b/chrome/browser/chromeos/gdata/gdata_cache.cc
|
| @@ -697,6 +697,14 @@ void GDataCache::RequestInitializeOnUIThread() {
|
| base::Bind(&GDataCache::Initialize, base::Unretained(this)));
|
| }
|
|
|
| +void GDataCache::RequestInitializeOnUIThreadForTesting() {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + blocking_task_runner_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&GDataCache::InitializeForTesting, base::Unretained(this)));
|
| +}
|
| +
|
| void GDataCache::ForceRescanOnUIThreadForTesting() {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
|
| @@ -743,6 +751,15 @@ void GDataCache::Initialize() {
|
| metadata_->Initialize(cache_paths_);
|
| }
|
|
|
| +void GDataCache::InitializeForTesting() {
|
| + AssertOnSequencedWorkerPool();
|
| +
|
| + InitCachePaths(cache_paths_);
|
| + metadata_ = GDataCacheMetadata::CreateGDataCacheMetadataForTesting(
|
| + blocking_task_runner_).Pass();
|
| + metadata_->Initialize(cache_paths_);
|
| +}
|
| +
|
| void GDataCache::Destroy() {
|
| AssertOnSequencedWorkerPool();
|
| delete this;
|
|
|