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