| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 
| 7 | 7 | 
| 8 #include <set> | 8 #include <set> | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 140   // |dest_directory|. | 140   // |dest_directory|. | 
| 141   // |recovered_cache_info| should contain cache info recovered from the trashed | 141   // |recovered_cache_info| should contain cache info recovered from the trashed | 
| 142   // metadata DB. It is used to ignore non-dirty files. | 142   // metadata DB. It is used to ignore non-dirty files. | 
| 143   bool RecoverFilesFromCacheDirectory( | 143   bool RecoverFilesFromCacheDirectory( | 
| 144       const base::FilePath& dest_directory, | 144       const base::FilePath& dest_directory, | 
| 145       const ResourceMetadataStorage::RecoveredCacheInfoMap& | 145       const ResourceMetadataStorage::RecoveredCacheInfoMap& | 
| 146           recovered_cache_info); | 146           recovered_cache_info); | 
| 147 | 147 | 
| 148  private: | 148  private: | 
| 149   friend class FileCacheTest; | 149   friend class FileCacheTest; | 
| 150   friend class FileCacheTestOnUIThread; |  | 
| 151 | 150 | 
| 152   ~FileCache(); | 151   ~FileCache(); | 
| 153 | 152 | 
| 154   // Returns absolute path of the file if it were cached or to be cached. | 153   // Returns absolute path of the file if it were cached or to be cached. | 
| 155   // | 154   // | 
| 156   // Can be called on any thread. | 155   // Can be called on any thread. | 
| 157   base::FilePath GetCacheFilePath(const std::string& id) const; | 156   base::FilePath GetCacheFilePath(const std::string& id) const; | 
| 158 | 157 | 
| 159   // Checks whether the current thread is on the right sequenced worker pool | 158   // Checks whether the current thread is on the right sequenced worker pool | 
| 160   // with the right sequence ID. If not, DCHECK will fail. | 159   // with the right sequence ID. If not, DCHECK will fail. | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 193   // invalidate its weak pointers before any other members are destroyed. | 192   // invalidate its weak pointers before any other members are destroyed. | 
| 194   // This object should be accessed only on |blocking_task_runner_|. | 193   // This object should be accessed only on |blocking_task_runner_|. | 
| 195   base::WeakPtrFactory<FileCache> weak_ptr_factory_; | 194   base::WeakPtrFactory<FileCache> weak_ptr_factory_; | 
| 196   DISALLOW_COPY_AND_ASSIGN(FileCache); | 195   DISALLOW_COPY_AND_ASSIGN(FileCache); | 
| 197 }; | 196 }; | 
| 198 | 197 | 
| 199 }  // namespace internal | 198 }  // namespace internal | 
| 200 }  // namespace drive | 199 }  // namespace drive | 
| 201 | 200 | 
| 202 #endif  // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 201 #endif  // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 
| OLD | NEW | 
|---|