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_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 private: | 156 private: |
157 friend class DriveResourceMetadataStorageTest; | 157 friend class DriveResourceMetadataStorageTest; |
158 | 158 |
159 // Puts header. | 159 // Puts header. |
160 void PutHeader(const DriveResourceMetadataHeader& header); | 160 void PutHeader(const DriveResourceMetadataHeader& header); |
161 | 161 |
162 // Gets header. | 162 // Gets header. |
163 scoped_ptr<DriveResourceMetadataHeader> GetHeader(); | 163 scoped_ptr<DriveResourceMetadataHeader> GetHeader(); |
164 | 164 |
| 165 // Checks validity of the data. |
| 166 bool CheckValidity(); |
| 167 |
165 // Path to the directory where the data is stored. | 168 // Path to the directory where the data is stored. |
166 base::FilePath directory_path_; | 169 base::FilePath directory_path_; |
167 | 170 |
168 // Entries stored in this storage. | 171 // Entries stored in this storage. |
169 scoped_ptr<leveldb::DB> resource_map_; | 172 scoped_ptr<leveldb::DB> resource_map_; |
170 | 173 |
171 // Parent-child relationship between entries. | 174 // Parent-child relationship between entries. |
172 scoped_ptr<leveldb::DB> child_map_; | 175 scoped_ptr<leveldb::DB> child_map_; |
173 | 176 |
174 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageDB); | 177 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadataStorageDB); |
175 }; | 178 }; |
176 | 179 |
177 } // namespace drive | 180 } // namespace drive |
178 | 181 |
179 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ | 182 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_STORAGE_H_ |
OLD | NEW |