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

Side by Side Diff: webkit/database/database_tracker.h

Issue 7748025: Cleanup: Remove a DCHECK about an empty database name that should not be there. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months 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
« no previous file with comments | « no previous file | webkit/database/database_tracker.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 (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_DATABASE_DATABASE_TRACKER_H_ 5 #ifndef WEBKIT_DATABASE_DATABASE_TRACKER_H_
6 #define WEBKIT_DATABASE_DATABASE_TRACKER_H_ 6 #define WEBKIT_DATABASE_DATABASE_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const string16& database_name); 214 const string16& database_name);
215 215
216 bool LazyInit(); 216 bool LazyInit();
217 bool UpgradeToCurrentVersion(); 217 bool UpgradeToCurrentVersion();
218 void InsertOrUpdateDatabaseDetails(const string16& origin_identifier, 218 void InsertOrUpdateDatabaseDetails(const string16& origin_identifier,
219 const string16& database_name, 219 const string16& database_name,
220 const string16& database_details, 220 const string16& database_details,
221 int64 estimated_size); 221 int64 estimated_size);
222 222
223 void ClearAllCachedOriginInfo(); 223 void ClearAllCachedOriginInfo();
224 CachedOriginInfo* GetCachedOriginInfo(const string16& origin_identifier); 224 CachedOriginInfo* MaybeGetCachedOriginInfo(const string16& origin_identifier,
225 bool create_if_needed);
226 CachedOriginInfo* GetCachedOriginInfo(const string16& origin_identifier) {
227 return MaybeGetCachedOriginInfo(origin_identifier, true);
228 }
225 229
226 int64 GetDBFileSize(const string16& origin_identifier, 230 int64 GetDBFileSize(const string16& origin_identifier,
227 const string16& database_name); 231 const string16& database_name);
228 int64 SeedOpenDatabaseSize(const string16& origin_identifier, 232 int64 SeedOpenDatabaseInfo(const string16& origin_identifier,
229 const string16& database_name); 233 const string16& database_name,
234 const string16& description);
235 int64 UpdateOpenDatabaseInfoAndNotify(const string16& origin_identifier,
236 const string16& database_name,
237 const string16* opt_description);
230 int64 UpdateOpenDatabaseSizeAndNotify(const string16& origin_identifier, 238 int64 UpdateOpenDatabaseSizeAndNotify(const string16& origin_identifier,
231 const string16& database_name); 239 const string16& database_name) {
240 return UpdateOpenDatabaseInfoAndNotify(
241 origin_identifier, database_name, NULL);
242 }
243
232 244
233 void ScheduleDatabaseForDeletion(const string16& origin_identifier, 245 void ScheduleDatabaseForDeletion(const string16& origin_identifier,
234 const string16& database_name); 246 const string16& database_name);
235 // Schedule a set of open databases for deletion. If non-null, callback is 247 // Schedule a set of open databases for deletion. If non-null, callback is
236 // invoked upon completion. 248 // invoked upon completion.
237 void ScheduleDatabasesForDeletion(const DatabaseSet& databases, 249 void ScheduleDatabasesForDeletion(const DatabaseSet& databases,
238 net::CompletionCallback* callback); 250 net::CompletionCallback* callback);
239 251
240 // Returns the directory where all DB files for the given origin are stored. 252 // Returns the directory where all DB files for the given origin are stored.
241 string16 GetOriginDirectory(const string16& origin_identifier); 253 string16 GetOriginDirectory(const string16& origin_identifier);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // this map to assign directory names that do not reveal this information. 290 // this map to assign directory names that do not reveal this information.
279 OriginDirectoriesMap incognito_origin_directories_; 291 OriginDirectoriesMap incognito_origin_directories_;
280 int incognito_origin_directories_generator_; 292 int incognito_origin_directories_generator_;
281 293
282 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper); 294 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper);
283 }; 295 };
284 296
285 } // namespace webkit_database 297 } // namespace webkit_database
286 298
287 #endif // WEBKIT_DATABASE_DATABASE_TRACKER_H_ 299 #endif // WEBKIT_DATABASE_DATABASE_TRACKER_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/database/database_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698