Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Unified Diff: components/drive/chromeos/file_cache.h

Issue 1918243004: Mark removable Drive caches for cryptohome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/drive/chromeos/file_cache.cc » ('j') | components/drive/chromeos/file_cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/drive/chromeos/file_cache.h
diff --git a/components/drive/chromeos/file_cache.h b/components/drive/chromeos/file_cache.h
index 23b104c9630a9b609e4957501ac8f8fe8823e414..222fa1a939b740e08d92f3ad4b03c7047901f4f6 100644
--- a/components/drive/chromeos/file_cache.h
+++ b/components/drive/chromeos/file_cache.h
@@ -144,6 +144,10 @@ class FileCache {
// Initializes the cache. Returns true on success.
bool Initialize();
+ // Returns if Drive cache migration for crbug/533750 should be invoked.
hashimoto 2016/05/02 08:29:20 nit: crbug/533750 ".com" missing. The same goes fo
oka 2016/05/09 14:27:40 Done.
+ // Public for testing.
+ bool ShouldStartDriveCacheMigration();
+
// Destroys this cache. This function posts a task to the blocking task
// runner to safely delete the object.
// Must be called on the UI thread.
@@ -158,14 +162,6 @@ class FileCache {
const ResourceMetadataStorage::RecoveredCacheInfoMap&
recovered_cache_info);
- // Migrates cache files from |from| directory to |to_files| directory with
- // creating links in |to_links| directory if necessary. Returns true for
- // success.
- static bool MigrateCacheFiles(const base::FilePath& from,
- const base::FilePath& to_files,
- const base::FilePath& to_links,
- ResourceMetadataStorage* metadata_storage);
-
private:
friend class FileCacheTest;
@@ -191,6 +187,15 @@ class FileCache {
// TODO(hashimoto): Remove this method at some point.
bool RenameCacheFilesToNewFormat();
+ // Add appropriate file attributes to the Drive cache directory and files in
hashimoto 2016/05/02 08:29:20 nit: "Add" -> "Adds". https://google.github.io/sty
oka 2016/05/09 14:27:40 Done. Merged MigrateCacheFiles and ResolveMetadat
+ // it for crbug/533750. Returns true on success.
+ // Inconsistency between cache and metadata should be resolved before this
hashimoto 2016/05/02 08:29:20 nit: How about "cache" -> "cache files" to avoid c
oka 2016/05/09 14:27:40 Done.
+ // method is called.
+ bool MigrateCacheFiles();
+
+ // Resolve metadata inconsistency in case cryptohome removed cache files.
+ bool ResolveMetadataInconsistency();
+
// This method must be called after writing to a cache file.
// Used to implement OpenForWrite().
void CloseForWrite(const std::string& id);
« no previous file with comments | « no previous file | components/drive/chromeos/file_cache.cc » ('j') | components/drive/chromeos/file_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698