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

Unified Diff: content/browser/cache_storage/cache_storage_context_impl.cc

Issue 1297093002: Cache Storage API: Hook up to chrome://settings/cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto https://codereview.chromium.org/1297023004 Created 5 years, 4 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/cache_storage/cache_storage_context_impl.cc
diff --git a/content/browser/cache_storage/cache_storage_context_impl.cc b/content/browser/cache_storage/cache_storage_context_impl.cc
index aa5c030cc05054e8dba74f980d39e3a51d6a4769..29bb50ccb4c7a0d5805777203b42acbeaa77ebf0 100644
--- a/content/browser/cache_storage/cache_storage_context_impl.cc
+++ b/content/browser/cache_storage/cache_storage_context_impl.cc
@@ -81,6 +81,26 @@ void CacheStorageContextImpl::SetBlobParametersForCache(
}
}
+void CacheStorageContextImpl::GetAllOriginsInfo(
+ const CacheStorageContext::GetUsageInfoCallback& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+
+ if (!cache_manager_) {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(callback, std::vector<CacheStorageUsageInfo>()));
+ return;
+ }
+
+ cache_manager_->GetAllOriginsUsage(callback);
+}
+
+void CacheStorageContextImpl::DeleteForOrigin(const GURL& origin) {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ if (cache_manager_)
+ cache_manager_->DeleteOriginData(origin);
+}
+
void CacheStorageContextImpl::CreateCacheStorageManager(
const base::FilePath& user_data_directory,
const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner,
« no previous file with comments | « content/browser/cache_storage/cache_storage_context_impl.h ('k') | content/browser/cache_storage/cache_storage_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698