Index: content/browser/indexed_db/indexed_db_context_impl.cc |
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc |
index 7992370af93cf4cffc593b9a6d4ced04cd854dfa..f045681a7c9a45ab19be85241d196e8fdcaf36d1 100644 |
--- a/content/browser/indexed_db/indexed_db_context_impl.cc |
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc |
@@ -13,6 +13,7 @@ |
#include "base/utf_string_conversions.h" |
#include "content/browser/indexed_db/indexed_db_quota_client.h" |
#include "content/public/browser/browser_thread.h" |
+#include "content/public/browser/indexed_db_info.h" |
#include "content/public/common/content_switches.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
@@ -122,6 +123,20 @@ std::vector<GURL> IndexedDBContextImpl::GetAllOrigins() { |
return origins; |
} |
+std::vector<IndexedDBInfo> IndexedDBContextImpl::GetAllOriginsInfo() { |
+ std::vector<GURL> origins = GetAllOrigins(); |
+ std::vector<IndexedDBInfo> result; |
+ for (std::vector<GURL>::const_iterator iter = origins.begin(); |
+ iter != origins.end(); ++iter) { |
+ const GURL& origin = *iter; |
+ |
+ result.push_back(IndexedDBInfo(origin, |
+ GetOriginDiskUsage(origin), |
+ GetOriginLastModified(origin))); |
+ } |
+ return result; |
+} |
+ |
int64 IndexedDBContextImpl::GetOriginDiskUsage(const GURL& origin_url) { |
if (data_path_.empty() || !IsInOriginSet(origin_url)) |
return 0; |