summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_connections.cc
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 23:04:30 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 23:04:30 +0000
commit373a46081a94ad850299876328b279e25f12e59f (patch)
tree103b2519dc9c376e555a483cb4a70f105792f0ea /webkit/database/database_connections.cc
parent1c1619682ce5dd4fbfc3caa8c76bdce0b13d09ca (diff)
downloadchromium_src-373a46081a94ad850299876328b279e25f12e59f.zip
chromium_src-373a46081a94ad850299876328b279e25f12e59f.tar.gz
chromium_src-373a46081a94ad850299876328b279e25f12e59f.tar.bz2
Adds support for SetDatabaseQuota(). Also, should remove a lot of
flakiness from the database layout tests: when a DB test calls ClearAllDatabases(), we force test_shell to wait for all DBs opened in previous tests to close before running the test. TEST=none BUG=32016,32396,32206,32157,30081 Review URL: http://codereview.chromium.org/549095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/database_connections.cc')
-rw-r--r--webkit/database/database_connections.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/webkit/database/database_connections.cc b/webkit/database/database_connections.cc
index a6e6d3d..c6e9609 100644
--- a/webkit/database/database_connections.cc
+++ b/webkit/database/database_connections.cc
@@ -15,8 +15,13 @@ DatabaseConnections::~DatabaseConnections() {
DCHECK(connections_.empty());
}
-bool DatabaseConnections::IsDatabaseOpened(const string16& origin_identifier,
- const string16& database_name) {
+bool DatabaseConnections::IsEmpty() const {
+ return connections_.empty();
+}
+
+bool DatabaseConnections::IsDatabaseOpened(
+ const string16& origin_identifier,
+ const string16& database_name) const {
OriginConnections::const_iterator origin_it =
connections_.find(origin_identifier);
if (origin_it == connections_.end())
@@ -25,7 +30,8 @@ bool DatabaseConnections::IsDatabaseOpened(const string16& origin_identifier,
return (origin_connections.find(database_name) != origin_connections.end());
}
-bool DatabaseConnections::IsOriginUsed(const string16& origin_identifier) {
+bool DatabaseConnections::IsOriginUsed(
+ const string16& origin_identifier) const {
return (connections_.find(origin_identifier) != connections_.end());
}