OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 LazyOpen(true); | 163 LazyOpen(true); |
164 return db_.get(); | 164 return db_.get(); |
165 } | 165 } |
166 | 166 |
167 private: | 167 private: |
168 bool RunCachedStatementWithIds( | 168 bool RunCachedStatementWithIds( |
169 const sql::StatementID& statement_id, const char* sql, | 169 const sql::StatementID& statement_id, const char* sql, |
170 const std::vector<int64>& ids); | 170 const std::vector<int64>& ids); |
171 bool RunUniqueStatementWithInt64Result(const char* sql, int64* result); | 171 bool RunUniqueStatementWithInt64Result(const char* sql, int64* result); |
172 | 172 |
173 bool PrepareUniqueStatement(const char* sql, sql::Statement* statement); | |
174 bool PrepareCachedStatement( | |
175 const sql::StatementID& id, const char* sql, sql::Statement* statement); | |
176 | |
177 bool FindResponseIdsForCacheHelper( | 173 bool FindResponseIdsForCacheHelper( |
178 int64 cache_id, std::vector<int64>* ids_vector, | 174 int64 cache_id, std::vector<int64>* ids_vector, |
179 std::set<int64>* ids_set); | 175 std::set<int64>* ids_set); |
180 | 176 |
181 // Record retrieval helpers | 177 // Record retrieval helpers |
182 void ReadGroupRecord(const sql::Statement& statement, GroupRecord* record); | 178 void ReadGroupRecord(const sql::Statement& statement, GroupRecord* record); |
183 void ReadCacheRecord(const sql::Statement& statement, CacheRecord* record); | 179 void ReadCacheRecord(const sql::Statement& statement, CacheRecord* record); |
184 void ReadEntryRecord(const sql::Statement& statement, EntryRecord* record); | 180 void ReadEntryRecord(const sql::Statement& statement, EntryRecord* record); |
185 void ReadNamespaceRecords( | 181 void ReadNamespaceRecords( |
186 sql::Statement* statement, | 182 sql::Statement* statement, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, DeletableResponseIds); | 216 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, DeletableResponseIds); |
221 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, OriginUsage); | 217 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, OriginUsage); |
222 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema3to4); | 218 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema3to4); |
223 | 219 |
224 DISALLOW_COPY_AND_ASSIGN(AppCacheDatabase); | 220 DISALLOW_COPY_AND_ASSIGN(AppCacheDatabase); |
225 }; | 221 }; |
226 | 222 |
227 } // namespace appcache | 223 } // namespace appcache |
228 | 224 |
229 #endif // WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ | 225 #endif // WEBKIT_APPCACHE_APPCACHE_DATABASE_H_ |
OLD | NEW |