OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
6 #define CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 6 #define CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 bool UpdateEntryToDB(const EntryKernel& entry); | 116 bool UpdateEntryToDB(const EntryKernel& entry); |
117 | 117 |
118 // Creates a new sqlite3 handle to the backing database. Sets sqlite operation | 118 // Creates a new sqlite3 handle to the backing database. Sets sqlite operation |
119 // timeout preferences and registers our overridden sqlite3 operators for | 119 // timeout preferences and registers our overridden sqlite3 operators for |
120 // said handle. Returns true on success, false if the sqlite open operation | 120 // said handle. Returns true on success, false if the sqlite open operation |
121 // did not succeed. | 121 // did not succeed. |
122 bool OpenAndConfigureHandleHelper(sqlite3** handle) const; | 122 bool OpenAndConfigureHandleHelper(sqlite3** handle) const; |
123 // Initialize and destroy load_dbhandle_. Broken out for testing. | 123 // Initialize and destroy load_dbhandle_. Broken out for testing. |
124 bool BeginLoad(); | 124 bool BeginLoad(); |
125 void EndLoad(); | 125 void EndLoad(); |
| 126 DirOpenResult DoLoad(MetahandlesIndex* entry_bucket, |
| 127 Directory::KernelLoadInfo* kernel_load_info); |
126 | 128 |
127 // Close save_dbhandle_. Broken out for testing. | 129 // Close save_dbhandle_. Broken out for testing. |
128 void EndSave(); | 130 void EndSave(); |
129 | 131 |
130 // Removes each entry whose metahandle is in |handles| from the database. | 132 // Removes each entry whose metahandle is in |handles| from the database. |
131 // Does synchronous I/O. Returns false on error. | 133 // Does synchronous I/O. Returns false on error. |
132 bool DeleteEntries(const MetahandleSet& handles); | 134 bool DeleteEntries(const MetahandleSet& handles); |
133 | 135 |
134 // Lazy creation of save_dbhandle_ for use by SaveChanges code path. | 136 // Lazy creation of save_dbhandle_ for use by SaveChanges code path. |
135 sqlite3* LazyGetSaveHandle(); | 137 sqlite3* LazyGetSaveHandle(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Set to true if migration left some old columns around that need to be | 180 // Set to true if migration left some old columns around that need to be |
179 // discarded. | 181 // discarded. |
180 bool needs_column_refresh_; | 182 bool needs_column_refresh_; |
181 | 183 |
182 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); | 184 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); |
183 }; | 185 }; |
184 | 186 |
185 } // namespace syncable | 187 } // namespace syncable |
186 | 188 |
187 #endif // CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 189 #endif // CHROME_BROWSER_SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
OLD | NEW |