| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESOURCE_METADATA_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Returns true when cache entries were not loaded to the DB during | 117 // Returns true when cache entries were not loaded to the DB during |
| 118 // initialization. | 118 // initialization. |
| 119 bool cache_file_scan_is_needed() const { return cache_file_scan_is_needed_; } | 119 bool cache_file_scan_is_needed() const { return cache_file_scan_is_needed_; } |
| 120 | 120 |
| 121 // Destroys this object. | 121 // Destroys this object. |
| 122 void Destroy(); | 122 void Destroy(); |
| 123 | 123 |
| 124 // Initializes this object. | 124 // Initializes this object. |
| 125 bool Initialize(); | 125 bool Initialize(); |
| 126 | 126 |
| 127 // Collects FileCacheEntry from trashed resource map DB. |
| 128 void RecoverCacheEntriesFromTrashedResourceMap( |
| 129 std::map<std::string, FileCacheEntry>* out_entries); |
| 130 |
| 127 // Sets the largest changestamp. | 131 // Sets the largest changestamp. |
| 128 bool SetLargestChangestamp(int64 largest_changestamp); | 132 bool SetLargestChangestamp(int64 largest_changestamp); |
| 129 | 133 |
| 130 // Gets the largest changestamp. | 134 // Gets the largest changestamp. |
| 131 int64 GetLargestChangestamp(); | 135 int64 GetLargestChangestamp(); |
| 132 | 136 |
| 133 // Puts the entry to this storage. | 137 // Puts the entry to this storage. |
| 134 bool PutEntry(const ResourceEntry& entry); | 138 bool PutEntry(const ResourceEntry& entry); |
| 135 | 139 |
| 136 // Gets an entry stored in this storage. | 140 // Gets an entry stored in this storage. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 201 |
| 198 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 202 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 199 | 203 |
| 200 DISALLOW_COPY_AND_ASSIGN(ResourceMetadataStorage); | 204 DISALLOW_COPY_AND_ASSIGN(ResourceMetadataStorage); |
| 201 }; | 205 }; |
| 202 | 206 |
| 203 } // namespace internal | 207 } // namespace internal |
| 204 } // namespace drive | 208 } // namespace drive |
| 205 | 209 |
| 206 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 210 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
| OLD | NEW |