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

Side by Side Diff: chrome/browser/chromeos/drive/drive_resource_metadata_storage.h

Issue 14167009: chromeos: Check validity of loaded data in DriveResourceMetadataStorageDB::Initialize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_resource_metadata_storage.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_resource_metadata_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698