gdata: Move ownership of GDataCache to GDataSystemService
BUG=131756
TEST=unit_tests --gtest_filter="GData*"
Review URL: https://chromiumcodereview.appspot.com/10546093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141643 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/chromeos/gdata/gdata_sync_client.cc b/chrome/browser/chromeos/gdata/gdata_sync_client.cc
index 1302e76..80f7a67f 100644
--- a/chrome/browser/chromeos/gdata/gdata_sync_client.cc
+++ b/chrome/browser/chromeos/gdata/gdata_sync_client.cc
@@ -73,9 +73,11 @@
} // namespace
GDataSyncClient::GDataSyncClient(Profile* profile,
- GDataFileSystemInterface* file_system)
+ GDataFileSystemInterface* file_system,
+ GDataCache* cache)
: profile_(profile),
file_system_(file_system),
+ cache_(cache),
registrar_(new PrefChangeRegistrar),
fetch_loop_is_running_(false),
weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
@@ -120,7 +122,7 @@
BrowserThread::GetBlockingPool()->PostTaskAndReply(
FROM_HERE,
base::Bind(&ScanPinnedDirectory,
- file_system_->GetCacheDirectoryPath(
+ cache_->GetCacheDirectoryPath(
GDataCache::CACHE_TYPE_PINNED),
resource_ids),
base::Bind(&GDataSyncClient::OnInitialScanComplete,