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

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

Issue 942633004: IndexedDB: Fixed support for empty blobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added bug for test re: Android Created 5 years, 9 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 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))
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.h ('k') | content/browser/loader/upload_data_stream_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698