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

Unified Diff: webkit/database/database_connections.h

Issue 7001014: More Quota WebSQLDatabase integration. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/database/database_connections.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/database/database_connections.h
===================================================================
--- webkit/database/database_connections.h (revision 85361)
+++ webkit/database/database_connections.h (working copy)
@@ -36,10 +36,22 @@
const DatabaseConnections& connections,
std::vector<std::pair<string16, string16> >* closed_dbs);
+ // Database sizes can be kept only if IsDatabaseOpened returns true.
+ int64 GetOpenDatabaseSize(const string16& origin_identifier,
+ const string16& database_name) const;
+ void SetOpenDatabaseSize(const string16& origin_identifier,
+ const string16& database_name,
+ int64 size);
+
+ // Returns a list of the connections, <origin_id, name>.
+ void ListConnections(
+ std::vector<std::pair<string16, string16> > *list) const;
+
private:
- typedef std::map<string16, int> DBConnections;
+ // Mapping from name to <openCount, size>
+ typedef std::map<string16, std::pair<int, int64> > DBConnections;
typedef std::map<string16, DBConnections> OriginConnections;
- OriginConnections connections_;
+ mutable OriginConnections connections_; // mutable for GetOpenDatabaseSize
void RemoveConnectionsHelper(const string16& origin_identifier,
const string16& database_name,
« no previous file with comments | « no previous file | webkit/database/database_connections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698