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

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 cocoa unit tests 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698