| 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 STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ |
| 6 #define STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ | 6 #define STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 friend class ObfuscatedFileUtil; | 116 friend class ObfuscatedFileUtil; |
| 117 | 117 |
| 118 bool Init(RecoveryOption recovery_option); | 118 bool Init(RecoveryOption recovery_option); |
| 119 bool RepairDatabase(const std::string& db_path); | 119 bool RepairDatabase(const std::string& db_path); |
| 120 void ReportInitStatus(const leveldb::Status& status); | 120 void ReportInitStatus(const leveldb::Status& status); |
| 121 bool StoreDefaultValues(); | 121 bool StoreDefaultValues(); |
| 122 bool GetLastFileId(FileId* file_id); | 122 bool GetLastFileId(FileId* file_id); |
| 123 bool AddFileInfoHelper( | 123 bool AddFileInfoHelper( |
| 124 const FileInfo& info, FileId file_id, leveldb::WriteBatch* batch); | 124 const FileInfo& info, FileId file_id, leveldb::WriteBatch* batch); |
| 125 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch); | 125 bool RemoveFileInfoHelper(FileId file_id, leveldb::WriteBatch* batch); |
| 126 // Close the database. Before this, all iterators associated with the database |
| 127 // must be deleted. |
| 126 void HandleError(const tracked_objects::Location& from_here, | 128 void HandleError(const tracked_objects::Location& from_here, |
| 127 const leveldb::Status& status); | 129 const leveldb::Status& status); |
| 128 | 130 |
| 129 const base::FilePath filesystem_data_directory_; | 131 const base::FilePath filesystem_data_directory_; |
| 130 leveldb::Env* env_override_; | 132 leveldb::Env* env_override_; |
| 131 scoped_ptr<leveldb::DB> db_; | 133 scoped_ptr<leveldb::DB> db_; |
| 132 base::Time last_reported_time_; | 134 base::Time last_reported_time_; |
| 133 DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase); | 135 DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase); |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 } // namespace storage | 138 } // namespace storage |
| 137 | 139 |
| 138 #endif // STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ | 140 #endif // STORAGE_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ |
| OLD | NEW |