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 COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 5 #ifndef COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
6 #define COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 6 #define COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
15 #include "components/drive/drive.pb.h" | 17 #include "components/drive/drive.pb.h" |
16 #include "components/drive/file_errors.h" | 18 #include "components/drive/file_errors.h" |
17 | 19 |
18 namespace base { | 20 namespace base { |
19 class SequencedTaskRunner; | 21 class SequencedTaskRunner; |
20 } | 22 } |
21 | 23 |
22 namespace leveldb { | 24 namespace leveldb { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Destroys this object. | 96 // Destroys this object. |
95 void Destroy(); | 97 void Destroy(); |
96 | 98 |
97 // Initializes this object. | 99 // Initializes this object. |
98 bool Initialize(); | 100 bool Initialize(); |
99 | 101 |
100 // Collects cache info from trashed resource map DB. | 102 // Collects cache info from trashed resource map DB. |
101 void RecoverCacheInfoFromTrashedResourceMap(RecoveredCacheInfoMap* out_info); | 103 void RecoverCacheInfoFromTrashedResourceMap(RecoveredCacheInfoMap* out_info); |
102 | 104 |
103 // Sets the largest changestamp. | 105 // Sets the largest changestamp. |
104 FileError SetLargestChangestamp(int64 largest_changestamp); | 106 FileError SetLargestChangestamp(int64_t largest_changestamp); |
105 | 107 |
106 // Gets the largest changestamp. | 108 // Gets the largest changestamp. |
107 FileError GetLargestChangestamp(int64* largest_changestamp); | 109 FileError GetLargestChangestamp(int64_t* largest_changestamp); |
108 | 110 |
109 // Puts the entry to this storage. | 111 // Puts the entry to this storage. |
110 FileError PutEntry(const ResourceEntry& entry); | 112 FileError PutEntry(const ResourceEntry& entry); |
111 | 113 |
112 // Gets an entry stored in this storage. | 114 // Gets an entry stored in this storage. |
113 FileError GetEntry(const std::string& id, ResourceEntry* out_entry); | 115 FileError GetEntry(const std::string& id, ResourceEntry* out_entry); |
114 | 116 |
115 // Removes an entry from this storage. | 117 // Removes an entry from this storage. |
116 FileError RemoveEntry(const std::string& id); | 118 FileError RemoveEntry(const std::string& id); |
117 | 119 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 165 |
164 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 166 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
165 | 167 |
166 DISALLOW_COPY_AND_ASSIGN(ResourceMetadataStorage); | 168 DISALLOW_COPY_AND_ASSIGN(ResourceMetadataStorage); |
167 }; | 169 }; |
168 | 170 |
169 } // namespace internal | 171 } // namespace internal |
170 } // namespace drive | 172 } // namespace drive |
171 | 173 |
172 #endif // COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 174 #endif // COMPONENTS_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
OLD | NEW |