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

Unified Diff: webkit/database/database_connections.h

Issue 7056025: More WebSQLDatabase and QuotaManager 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
Index: webkit/database/database_connections.h
===================================================================
--- webkit/database/database_connections.h (revision 86470)
+++ webkit/database/database_connections.h (working copy)
@@ -27,10 +27,15 @@
bool IsDatabaseOpened(const string16& origin_identifier,
const string16& database_name) const;
bool IsOriginUsed(const string16& origin_identifier) const;
- void AddConnection(const string16& origin_identifier,
+
+ // Returns true if this is the first connection.
+ bool AddConnection(const string16& origin_identifier,
const string16& database_name);
- void RemoveConnection(const string16& origin_identifier,
+
+ // Returns true if the last connection was removed.
+ bool RemoveConnection(const string16& origin_identifier,
const string16& database_name);
+
void RemoveAllConnections();
void RemoveConnections(
const DatabaseConnections& connections,
@@ -53,7 +58,8 @@
typedef std::map<string16, DBConnections> OriginConnections;
mutable OriginConnections connections_; // mutable for GetOpenDatabaseSize
- void RemoveConnectionsHelper(const string16& origin_identifier,
+ // Returns true if the last connection was removed.
+ bool RemoveConnectionsHelper(const string16& origin_identifier,
const string16& database_name,
int num_connections);
};

Powered by Google App Engine
This is Rietveld 408576698