| 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 SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 5 #ifndef SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
| 6 #define SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 6 #define SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // Close save_dbhandle_. Broken out for testing. | 106 // Close save_dbhandle_. Broken out for testing. |
| 107 void EndSave(); | 107 void EndSave(); |
| 108 | 108 |
| 109 // Removes each entry whose metahandle is in |handles| from the database. | 109 // Removes each entry whose metahandle is in |handles| from the database. |
| 110 // Does synchronous I/O. Returns false on error. | 110 // Does synchronous I/O. Returns false on error. |
| 111 bool DeleteEntries(const MetahandleSet& handles); | 111 bool DeleteEntries(const MetahandleSet& handles); |
| 112 | 112 |
| 113 // Drop all tables in preparation for reinitialization. | 113 // Drop all tables in preparation for reinitialization. |
| 114 void DropAllTables(); | 114 void DropAllTables(); |
| 115 | 115 |
| 116 // Serialization helpers for syncable::ModelType. These convert between | 116 // Serialization helpers for syncer::ModelType. These convert between |
| 117 // the ModelType enum and the values we persist in the database to identify | 117 // the ModelType enum and the values we persist in the database to identify |
| 118 // a model. We persist a default instance of the specifics protobuf as the | 118 // a model. We persist a default instance of the specifics protobuf as the |
| 119 // ID, rather than the enum value. | 119 // ID, rather than the enum value. |
| 120 static ModelType ModelIdToModelTypeEnum(const void* data, int length); | 120 static ModelType ModelIdToModelTypeEnum(const void* data, int length); |
| 121 static std::string ModelTypeEnumToModelId(ModelType model_type); | 121 static std::string ModelTypeEnumToModelId(ModelType model_type); |
| 122 | 122 |
| 123 static std::string GenerateCacheGUID(); | 123 static std::string GenerateCacheGUID(); |
| 124 | 124 |
| 125 // Runs an integrity check on the current database. If the | 125 // Runs an integrity check on the current database. If the |
| 126 // integrity check fails, false is returned and error is populated | 126 // integrity check fails, false is returned and error is populated |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // discarded. | 160 // discarded. |
| 161 bool needs_column_refresh_; | 161 bool needs_column_refresh_; |
| 162 | 162 |
| 163 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); | 163 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 } // namespace syncable | 166 } // namespace syncable |
| 167 } // namespace syncer | 167 } // namespace syncer |
| 168 | 168 |
| 169 #endif // SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 169 #endif // SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
| OLD | NEW |