| Index: chrome/browser/chromeos/gdata/gdata_cache.h
|
| diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
|
| index 125d2ac986057a61d9d6da37a81e8ebebc0caa2b..c9eb8d449ae7550f6c7c71d32de2868a053ba45a 100644
|
| --- a/chrome/browser/chromeos/gdata/gdata_cache.h
|
| +++ b/chrome/browser/chromeos/gdata/gdata_cache.h
|
| @@ -30,9 +30,10 @@ namespace gdata {
|
| class GDataCacheEntry;
|
| class GDataCacheMetadata;
|
|
|
| -// Callback for SetMountedStateOnUIThread.
|
| +// Callback for SetMountedStateOnUIThread and ClearAllOnUIThread.
|
| typedef base::Callback<void(GDataFileError error,
|
| - const FilePath& file_path)> SetMountedStateCallback;
|
| + const FilePath& file_path)>
|
| + ChangeCacheStateCallback;
|
|
|
| // Callback for completion of cache operation.
|
| typedef base::Callback<void(GDataFileError error,
|
| @@ -229,7 +230,7 @@ class GDataCache {
|
| // |dest_path| is the mounted path and |source_path| the unmounted path.
|
| void SetMountedStateOnUIThread(const FilePath& file_path,
|
| bool to_mount,
|
| - const SetMountedStateCallback& callback);
|
| + const ChangeCacheStateCallback& callback);
|
|
|
| // Modifies cache state, which involves the following:
|
| // - moves |source_path| to |dest_path| in persistent dir, where
|
| @@ -263,6 +264,11 @@ class GDataCache {
|
| void RemoveOnUIThread(const std::string& resource_id,
|
| const CacheOperationCallback& callback);
|
|
|
| + // Does the following:
|
| + // - remove all the files in the cache directory.
|
| + // - re-create the |metadata_| instance.
|
| + void ClearAllOnUIThread(const ChangeCacheStateCallback& callback);
|
| +
|
| // Utility method to call Initialize on UI thread.
|
| void RequestInitializeOnUIThread();
|
|
|
| @@ -396,6 +402,9 @@ class GDataCache {
|
| void Remove(const std::string& resource_id,
|
| GDataFileError* error);
|
|
|
| + // Used to implement ClearAllUIThread.
|
| + void ClearAll(GDataFileError* error);
|
| +
|
| // Runs callback and notifies the observers when file is pinned.
|
| void OnPinned(GDataFileError* error,
|
| const std::string& resource_id,
|
|
|