1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_CACHE_STORAGE_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_CACHE_STORAGE_CONTEXT_H_
10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h"
12 #include "content/public/browser/cache_storage_usage_info.h"
16 // Represents the per-BrowserContext Cache Storage data.
17 class CacheStorageContext
18 : public base::RefCountedThreadSafe
<CacheStorageContext
> {
20 using GetUsageInfoCallback
= base::Callback
<void(
21 const std::vector
<CacheStorageUsageInfo
>& usage_info
)>;
23 // Methods used in response to browsing data and quota manager requests.
24 // Must be called on the IO thread.
25 virtual void GetAllOriginsInfo(const GetUsageInfoCallback
& callback
) = 0;
26 virtual void DeleteForOrigin(const GURL
& origin_url
) = 0;
29 friend class base::RefCountedThreadSafe
<CacheStorageContext
>;
30 virtual ~CacheStorageContext() {}
33 } // namespace content
35 #endif // CONTENT_PUBLIC_BROWSER_CACHE_STORAGE_CONTEXT_H_