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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Create 'share_info' or 'temp_share_info' depending on value of | 77 // Create 'share_info' or 'temp_share_info' depending on value of |
78 // is_temporary. Returns an sqlite | 78 // is_temporary. Returns an sqlite |
79 bool CreateShareInfoTable(bool is_temporary); | 79 bool CreateShareInfoTable(bool is_temporary); |
80 | 80 |
81 bool CreateShareInfoTableVersion71(bool is_temporary); | 81 bool CreateShareInfoTableVersion71(bool is_temporary); |
82 // Create 'metas' or 'temp_metas' depending on value of is_temporary. | 82 // Create 'metas' or 'temp_metas' depending on value of is_temporary. |
83 bool CreateMetasTable(bool is_temporary); | 83 bool CreateMetasTable(bool is_temporary); |
84 bool CreateModelsTable(); | 84 bool CreateModelsTable(); |
85 bool CreateV71ModelsTable(); | 85 bool CreateV71ModelsTable(); |
| 86 bool CreateV75ModelsTable(); |
86 | 87 |
87 // We don't need to load any synced and applied deleted entries, we can | 88 // We don't need to load any synced and applied deleted entries, we can |
88 // in fact just purge them forever on startup. | 89 // in fact just purge them forever on startup. |
89 bool DropDeletedEntries(); | 90 bool DropDeletedEntries(); |
90 // Drops a table if it exists, harmless if the table did not already exist. | 91 // Drops a table if it exists, harmless if the table did not already exist. |
91 bool SafeDropTable(const char* table_name); | 92 bool SafeDropTable(const char* table_name); |
92 | 93 |
93 // Load helpers for entries and attributes. | 94 // Load helpers for entries and attributes. |
94 bool LoadEntries(MetahandlesIndex* entry_bucket); | 95 bool LoadEntries(MetahandlesIndex* entry_bucket); |
95 bool LoadInfo(Directory::KernelLoadInfo* info); | 96 bool LoadInfo(Directory::KernelLoadInfo* info); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 bool MigrateVersion73To74(); | 152 bool MigrateVersion73To74(); |
152 bool MigrateVersion74To75(); | 153 bool MigrateVersion74To75(); |
153 bool MigrateVersion75To76(); | 154 bool MigrateVersion75To76(); |
154 bool MigrateVersion76To77(); | 155 bool MigrateVersion76To77(); |
155 bool MigrateVersion77To78(); | 156 bool MigrateVersion77To78(); |
156 bool MigrateVersion78To79(); | 157 bool MigrateVersion78To79(); |
157 bool MigrateVersion79To80(); | 158 bool MigrateVersion79To80(); |
158 bool MigrateVersion80To81(); | 159 bool MigrateVersion80To81(); |
159 bool MigrateVersion81To82(); | 160 bool MigrateVersion81To82(); |
160 bool MigrateVersion82To83(); | 161 bool MigrateVersion82To83(); |
| 162 bool MigrateVersion83To84(); |
161 | 163 |
162 scoped_ptr<sql::Connection> db_; | 164 scoped_ptr<sql::Connection> db_; |
163 sql::Statement save_entry_statement_; | 165 sql::Statement save_entry_statement_; |
164 std::string dir_name_; | 166 std::string dir_name_; |
165 | 167 |
166 // Set to true if migration left some old columns around that need to be | 168 // Set to true if migration left some old columns around that need to be |
167 // discarded. | 169 // discarded. |
168 bool needs_column_refresh_; | 170 bool needs_column_refresh_; |
169 | 171 |
170 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); | 172 DISALLOW_COPY_AND_ASSIGN(DirectoryBackingStore); |
171 }; | 173 }; |
172 | 174 |
173 } // namespace syncable | 175 } // namespace syncable |
174 } // namespace syncer | 176 } // namespace syncer |
175 | 177 |
176 #endif // SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ | 178 #endif // SYNC_SYNCABLE_DIRECTORY_BACKING_STORE_H_ |
OLD | NEW |