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

Side by Side Diff: storage/browser/quota/quota_database.h

Issue 1419573008: [sql] QuotaDatabase schema upgrade doesn't use transactions right. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « sql/connection.cc ('k') | storage/browser/quota/quota_database.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_ 5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_
6 #define STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_ 6 #define STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void ScheduleCommit(); 155 void ScheduleCommit();
156 156
157 bool FindOriginUsedCount(const GURL& origin, 157 bool FindOriginUsedCount(const GURL& origin,
158 StorageType type, 158 StorageType type,
159 int* used_count); 159 int* used_count);
160 160
161 bool LazyOpen(bool create_if_needed); 161 bool LazyOpen(bool create_if_needed);
162 bool EnsureDatabaseVersion(); 162 bool EnsureDatabaseVersion();
163 bool ResetSchema(); 163 bool ResetSchema();
164 bool UpgradeSchema(int current_version); 164 bool UpgradeSchema(int current_version);
165 bool InsertOrReplaceHostQuota(
166 const std::string& host, StorageType type, int64 quota);
165 167
166 static bool CreateSchema( 168 static bool CreateSchema(
167 sql::Connection* database, 169 sql::Connection* database,
168 sql::MetaTable* meta_table, 170 sql::MetaTable* meta_table,
169 int schema_version, int compatible_version, 171 int schema_version, int compatible_version,
170 const TableSchema* tables, size_t tables_size, 172 const TableSchema* tables, size_t tables_size,
171 const IndexSchema* indexes, size_t indexes_size); 173 const IndexSchema* indexes, size_t indexes_size);
172 174
173 // |callback| may return false to stop reading data. 175 // |callback| may return false to stop reading data.
174 bool DumpQuotaTable(const QuotaTableCallback& callback); 176 bool DumpQuotaTable(const QuotaTableCallback& callback);
(...skipping 13 matching lines...) Expand all
188 190
189 static const TableSchema kTables[]; 191 static const TableSchema kTables[];
190 static const IndexSchema kIndexes[]; 192 static const IndexSchema kIndexes[];
191 193
192 DISALLOW_COPY_AND_ASSIGN(QuotaDatabase); 194 DISALLOW_COPY_AND_ASSIGN(QuotaDatabase);
193 }; 195 };
194 196
195 } // namespace storage 197 } // namespace storage
196 198
197 #endif // STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_ 199 #endif // STORAGE_BROWSER_QUOTA_QUOTA_DATABASE_H_
OLDNEW
« no previous file with comments | « sql/connection.cc ('k') | storage/browser/quota/quota_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698