Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: webkit/browser/appcache/appcache_database.h

Issue 104593010: AppCache: Run a quick integrity check on the sqlite database when opening. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 WEBKIT_BROWSER_APPCACHE_APPCACHE_DATABASE_H_ 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_DATABASE_H_
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_DATABASE_H_ 6 #define WEBKIT_BROWSER_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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 sql::Statement* statement, 181 sql::Statement* statement,
182 NamespaceRecordVector* intercepts, 182 NamespaceRecordVector* intercepts,
183 NamespaceRecordVector* fallbacks); 183 NamespaceRecordVector* fallbacks);
184 void ReadNamespaceRecord( 184 void ReadNamespaceRecord(
185 const sql::Statement* statement, NamespaceRecord* record); 185 const sql::Statement* statement, NamespaceRecord* record);
186 void ReadOnlineWhiteListRecord( 186 void ReadOnlineWhiteListRecord(
187 const sql::Statement& statement, OnlineWhiteListRecord* record); 187 const sql::Statement& statement, OnlineWhiteListRecord* record);
188 188
189 // Database creation 189 // Database creation
190 bool LazyOpen(bool create_if_needed); 190 bool LazyOpen(bool create_if_needed);
191 bool QuickIntegrityCheck();
191 bool EnsureDatabaseVersion(); 192 bool EnsureDatabaseVersion();
192 bool CreateSchema(); 193 bool CreateSchema();
193 bool UpgradeSchema(); 194 bool UpgradeSchema();
194 195
195 void ResetConnectionAndTables(); 196 void ResetConnectionAndTables();
196 197
197 // Deletes the existing database file and the entire directory containing 198 // Deletes the existing database file and the entire directory containing
198 // the database file including the disk cache in which response headers 199 // the database file including the disk cache in which response headers
199 // and bodies are stored, and then creates a new database file. 200 // and bodies are stored, and then creates a new database file.
200 bool DeleteExistingAndCreateNewDatabase(); 201 bool DeleteExistingAndCreateNewDatabase();
(...skipping 16 matching lines...) Expand all
217 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, OriginUsage); 218 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, OriginUsage);
218 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema3to5); 219 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema3to5);
219 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema4to5); 220 FRIEND_TEST_ALL_PREFIXES(AppCacheDatabaseTest, UpgradeSchema4to5);
220 221
221 DISALLOW_COPY_AND_ASSIGN(AppCacheDatabase); 222 DISALLOW_COPY_AND_ASSIGN(AppCacheDatabase);
222 }; 223 };
223 224
224 } // namespace appcache 225 } // namespace appcache
225 226
226 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_DATABASE_H_ 227 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698