Chromium Code Reviews| Index: webkit/database/database_connections.h |
| =================================================================== |
| --- webkit/database/database_connections.h (revision 86348) |
| +++ 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 of this is the first connection. |
|
kinuko
2011/05/24 05:31:36
nit: of -> if?
michaeln
2011/05/25 01:28:06
Done.
|
| + 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); |
| }; |