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

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

Issue 1989863005: Revert of Mark removable Drive caches for cryptohome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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') | no next file with comments »
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 2d17202e0db0935486550a142acd804bc1d86aaf..23b104c9630a9b609e4957501ac8f8fe8823e414 100644
--- a/components/drive/chromeos/file_cache.h
+++ b/components/drive/chromeos/file_cache.h
@@ -53,9 +53,6 @@ class FreeDiskSpaceGetterInterface {
// GetCacheFilePath() for example), should be run with |blocking_task_runner|.
class FileCache {
public:
- // The file extended attribute assigned to Drive cache directory.
- static const char kGCacheFilesAttribute[];
-
// Enum defining type of file operation e.g. copy or move, etc.
enum FileOperationType {
FILE_OPERATION_MOVE = 0,
@@ -161,6 +158,14 @@ 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;
@@ -186,12 +191,6 @@ class FileCache {
// TODO(hashimoto): Remove this method at some point.
bool RenameCacheFilesToNewFormat();
- // Adds appropriate file attributes to the Drive cache directory and files in
- // it for crbug.com/533750. Returns true on success.
- // This also resolves inconsistency between cache files and metadata which can
- // be produced when cryptohome removed cache files or on abrupt shutdown.
- bool FixMetadataAndFileAttributes();
-
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698