| Index: components/web_cache/browser/web_cache_manager.h
|
| diff --git a/components/web_cache/browser/web_cache_manager.h b/components/web_cache/browser/web_cache_manager.h
|
| index a0c19073612c326778bc3109dfc636a823581ad5..e93af6584d334c54748ccdb292b262da9d1b99d9 100644
|
| --- a/components/web_cache/browser/web_cache_manager.h
|
| +++ b/components/web_cache/browser/web_cache_manager.h
|
| @@ -19,6 +19,7 @@
|
| #include "base/macros.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/time/time.h"
|
| +#include "components/web_cache/public/interfaces/web_cache.mojom.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
|
|
| @@ -100,6 +101,7 @@ class WebCacheManager : public content::NotificationObserver {
|
| void ClearCache();
|
|
|
| // Instantly clears renderer cache for a process.
|
| + // Must be called between Add(process_id) and Remove(process_id).
|
| void ClearCacheForProcess(int process_id);
|
|
|
| // Clears all in-memory caches when a tab is reloaded or the user navigates
|
| @@ -140,6 +142,9 @@ class WebCacheManager : public content::NotificationObserver {
|
| // each renderer is permitted to consume for its cache.
|
| typedef std::list<Allocation> AllocationStrategy;
|
|
|
| + // The key is the unique id of every render process host.
|
| + typedef std::map<int, mojom::WebCachePtr> WebCacheServicesMap;
|
| +
|
| // This class is a singleton. Do not instantiate directly.
|
| WebCacheManager();
|
| friend struct base::DefaultSingletonTraits<WebCacheManager>;
|
| @@ -257,6 +262,9 @@ class WebCacheManager : public content::NotificationObserver {
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
| + // Maps every renderer_id with its corresponding mojom::WebCachePtr.
|
| + WebCacheServicesMap web_cache_services_;
|
| +
|
| base::WeakPtrFactory<WebCacheManager> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
|
|
|