summaryrefslogtreecommitdiffstats
path: root/webkit/database/quota_table.h
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 21:15:55 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 21:15:55 +0000
commit3ccfe535658c8852c1cc1df01372ecc602f376cd (patch)
tree47582af5ba2a4f0658126d564d618c18a93173cf /webkit/database/quota_table.h
parent6d8e2a64b6961331816689850192a8ee864f9a97 (diff)
downloadchromium_src-3ccfe535658c8852c1cc1df01372ecc602f376cd.zip
chromium_src-3ccfe535658c8852c1cc1df01372ecc602f376cd.tar.gz
chromium_src-3ccfe535658c8852c1cc1df01372ecc602f376cd.tar.bz2
Adding methods that will be used by the quota management UI.
TEST=none BUG=none Review URL: http://codereview.chromium.org/507014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35651 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/quota_table.h')
-rw-r--r--webkit/database/quota_table.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/webkit/database/quota_table.h b/webkit/database/quota_table.h
new file mode 100644
index 0000000..8f6e4e8
--- /dev/null
+++ b/webkit/database/quota_table.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_DATABASE_QUOTA_TABLE_H_
+#define WEBKIT_DATABASE_QUOTA_TABLE_H_
+
+#include <vector>
+
+#include "base/string16.h"
+
+namespace sql {
+class Connection;
+}
+
+namespace webkit_database {
+
+class QuotaTable {
+ public:
+ explicit QuotaTable(sql::Connection* db) : db_(db) { }
+
+ bool Init();
+ int64 GetOriginQuota(const string16& origin_identifier);
+ bool SetOriginQuota(const string16& origin_identifier, int64 quota);
+ bool ClearOriginQuota(const string16& origin_identifier);
+
+ private:
+ sql::Connection* db_;
+};
+
+} // namespace webkit_database
+
+#endif // WEBKIT_DATABASE_QUOTA_TABLE_H_