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

Unified Diff: content/browser/indexed_db/indexed_db_context_impl.cc

Issue 13954002: Refactor IndexedDBInfo out of browsingdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix performance_ui_tests too Created 7 years, 8 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
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..ba9904f91481deb5fac2234f6a949ff145712900 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -122,6 +122,21 @@ 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;
+
+ IndexedDBInfo info = { origin,
+ GetOriginDiskUsage(origin),
+ GetOriginLastModified(origin) };
+ result.push_back(info);
+ }
+ return result;
+}
+
int64 IndexedDBContextImpl::GetOriginDiskUsage(const GURL& origin_url) {
if (data_path_.empty() || !IsInOriginSet(origin_url))
return 0;

Powered by Google App Engine
This is Rietveld 408576698