summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 13:41:47 +0000
committerachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 13:41:47 +0000
commit3653146a977bc2a4d85e1e86f420e97ba2910c8d (patch)
tree1373e1f2de6f2e30cad0bf7e48badd02e2ffd8f9 /chrome/browser/download
parent486a7408ccc0fc5455045608c234c3070aba7d01 (diff)
downloadchromium_src-3653146a977bc2a4d85e1e86f420e97ba2910c8d.zip
chromium_src-3653146a977bc2a4d85e1e86f420e97ba2910c8d.tar.gz
chromium_src-3653146a977bc2a4d85e1e86f420e97ba2910c8d.tar.bz2
GDataCache initial implementation.
* cache related methods, enums, etc have been moved out of GDataRootDirectory and GDataFile into GDataCache. Some of these methods have been renamed. * GDataCache is an interface, with a map implementation GDataCacheMap. This is in preperation for a database implementation. * CacheMap is now map of <string, CacheEntry> instead of <string, CacheEntry*> * GetCacheEntry returns a scoped_ptr<CacheEntry> instead of CacheEntry*. * GDataFileSystem has a cache_ data member, and root_-> is now cache_-> for cache methods. * cache_ may only be accessed on the blocking thread pool. Added assertions to this effect, and removed all locking for cache_ access. * Got rid of InitializeCacheIfNecessary. The cache is initialized upon startup on the blocking pool instead of lazily. GDataFileSystemTest::InitializeCache was modified to make this work. * Fixed ~GDataRootDirectory - stale root_ was being accessed in ~GDataDirectory. * The only change in most files is that GDataRootDirectory:: and GDataFile:: is now GDataCache:: * Added gdata_cache_unittest.cc for cache api tests. BUG=127856,129506 TEST=unit tests pass. Review URL: https://chromiumcodereview.appspot.com/10332188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_file_picker_chromeos.cc2
-rw-r--r--chrome/browser/download/save_package_file_picker_chromeos.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/download/download_file_picker_chromeos.cc b/chrome/browser/download/download_file_picker_chromeos.cc
index 873299f..326ffc0 100644
--- a/chrome/browser/download/download_file_picker_chromeos.cc
+++ b/chrome/browser/download/download_file_picker_chromeos.cc
@@ -70,7 +70,7 @@ void DownloadFilePickerChromeOS::FileSelected(const FilePath& selected_path,
const FilePath gdata_tmp_download_dir =
system_service->file_system()->GetCacheDirectoryPath(
- gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOWNLOADS);
+ gdata::GDataCache::CACHE_TYPE_TMP_DOWNLOADS);
// Swap the gdata path with a local path. Local path must be created
// on the IO thread pool.
diff --git a/chrome/browser/download/save_package_file_picker_chromeos.cc b/chrome/browser/download/save_package_file_picker_chromeos.cc
index e2ed86a..f39a566 100644
--- a/chrome/browser/download/save_package_file_picker_chromeos.cc
+++ b/chrome/browser/download/save_package_file_picker_chromeos.cc
@@ -100,7 +100,7 @@ void SavePackageFilePickerChromeOS::FileSelected(
// download_created_callback = OnSavePackageDownloadCreated
FilePath gdata_tmp_download_dir =
system_service->file_system()->GetCacheDirectoryPath(
- gdata::GDataRootDirectory::CACHE_TYPE_TMP_DOWNLOADS);
+ gdata::GDataCache::CACHE_TYPE_TMP_DOWNLOADS);
FilePath* gdata_tmp_download_path(new FilePath());
content::BrowserThread::GetBlockingPool()->PostTaskAndReply(FROM_HERE,
base::Bind(&gdata::GDataDownloadObserver::GetGDataTempDownloadPath,