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 f1357fdef50fa256bc87bd1e149d950dd437d290..2a6a4b47b4af605d64eb6f41861fb4c4e6b4075d 100644 |
--- a/content/browser/indexed_db/indexed_db_context_impl.cc |
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc |
@@ -273,6 +273,19 @@ base::ListValue* IndexedDBContextImpl::GetAllOriginsDetails() { |
return list.release(); |
} |
+int IndexedDBContextImpl::GetOriginBlobFileCount(const GURL& origin_url) { |
+ DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
+ int count = 0; |
+ base::FileEnumerator file_enumerator( |
+ GetBlobPath(storage::GetIdentifierFromOrigin(origin_url)), true, |
+ base::FileEnumerator::FILES); |
+ for (base::FilePath file_path = file_enumerator.Next(); !file_path.empty(); |
+ file_path = file_enumerator.Next()) { |
+ count++; |
+ } |
+ return count; |
+} |
+ |
int64 IndexedDBContextImpl::GetOriginDiskUsage(const GURL& origin_url) { |
DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
if (data_path_.empty() || !IsInOriginSet(origin_url)) |