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

Unified Diff: webkit/quota/quota_database.h

Issue 7057006: Add Dump{Quota,LastAccessTime}Table (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 'Move Assign*** and Rename AccessTable' 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/quota/quota_database.cc » ('j') | webkit/quota/quota_database.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_database.h
diff --git a/webkit/quota/quota_database.h b/webkit/quota/quota_database.h
index 32560b57429fbb52da89ccfae76a4db09fa43557..88a276d632599f0cad313024c4d63781ab139f15 100644
--- a/webkit/quota/quota_database.h
+++ b/webkit/quota/quota_database.h
@@ -9,10 +9,13 @@
#include <string>
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
#include "base/timer.h"
+#include "googleurl/src/gurl.h"
#include "webkit/quota/quota_types.h"
namespace sql {
@@ -82,6 +85,29 @@ class QuotaDatabase {
bool CreateSchema();
bool ResetSchema();
+ // For Tests and Debug use
+ struct QuotaTableEntry {
+ std::string host;
+ StorageType type;
+ int64 quota;
+ };
+ typedef base::Callback<bool (const QuotaTableEntry&)> QuotaTableCallback;
+ bool DumpQuotaTable(QuotaTableCallback* callback);
+ friend bool operator <(const QuotaTableEntry& lhs,
+ const QuotaTableEntry& rhs);
+
+ struct LastAccessTimeTableEntry {
+ GURL origin;
+ StorageType type;
+ int used_count;
+ base::Time last_access_time;
+ };
+ typedef base::Callback<bool (const LastAccessTimeTableEntry&)>
+ LastAccessTimeTableCallback;
+ bool DumpLastAccessTimeTable(LastAccessTimeTableCallback* callback);
+ friend bool operator <(const LastAccessTimeTableEntry& lhs,
+ const LastAccessTimeTableEntry& rhs);
+
FilePath db_file_path_;
scoped_ptr<sql::Connection> db_;
« no previous file with comments | « no previous file | webkit/quota/quota_database.cc » ('j') | webkit/quota/quota_database.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698