| 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 e93af6584d334c54748ccdb292b262da9d1b99d9..4c2f60772bac1e0ed0992227971ab1f7a93046f2 100644
|
| --- a/components/web_cache/browser/web_cache_manager.h
|
| +++ b/components/web_cache/browser/web_cache_manager.h
|
| @@ -84,12 +84,7 @@ class WebCacheManager : public content::NotificationObserver {
|
| // Periodically, renderers should inform the cache manager of their current
|
| // statistics. The more up-to-date the cache manager's statistics, the
|
| // better it can allocate cache resources.
|
| - void ObserveStats(int renderer_id,
|
| - uint64_t min_dead_capacity,
|
| - uint64_t max_dead_capacity,
|
| - uint64_t capacity,
|
| - uint64_t live_size,
|
| - uint64_t dead_size);
|
| + void ObserveStats(int renderer_id, uint64_t capacity, uint64_t size);
|
|
|
| // The global limit on the number of bytes in all the in-memory caches.
|
| uint64_t global_size_limit() const { return global_size_limit_; }
|
| @@ -125,11 +120,8 @@ class WebCacheManager : public content::NotificationObserver {
|
| struct RendererInfo {
|
| // The access time for this renderer.
|
| base::Time access;
|
| - uint64_t min_dead_capacity;
|
| - uint64_t max_dead_capacity;
|
| uint64_t capacity;
|
| - uint64_t live_size;
|
| - uint64_t dead_size;
|
| + uint64_t size;
|
| };
|
|
|
| typedef std::map<int, RendererInfo> StatsMap;
|
| @@ -177,14 +169,6 @@ class WebCacheManager : public content::NotificationObserver {
|
|
|
| // Allow each renderer to keep its current set of cached resources.
|
| KEEP_CURRENT,
|
| -
|
| - // Allow each renderer to keep cache resources it believes are currently
|
| - // being used, with some extra allocation to store new objects.
|
| - KEEP_LIVE_WITH_HEADROOM,
|
| -
|
| - // Allow each renderer to keep cache resources it believes are currently
|
| - // being used, but instruct the renderer to discard all other data.
|
| - KEEP_LIVE,
|
| };
|
|
|
| // Helper functions for devising an allocation strategy
|
| @@ -193,15 +177,12 @@ class WebCacheManager : public content::NotificationObserver {
|
| // in the given parameters.
|
| void GatherStats(const std::set<int>& renderers,
|
| uint64_t* capacity,
|
| - uint64_t* live_size,
|
| - uint64_t* dead_size);
|
| + uint64_t* size);
|
|
|
| // Get the amount of memory that would be required to implement |tactic|
|
| // using the specified allocation tactic. This function defines the
|
| // semantics for each of the tactics.
|
| - static uint64_t GetSize(AllocationTactic tactic,
|
| - uint64_t live_size,
|
| - uint64_t dead_size);
|
| + static uint64_t GetSize(AllocationTactic tactic, uint64_t size);
|
|
|
| // Attempt to use the specified tactics to compute an allocation strategy
|
| // and place the result in |strategy|. |active_stats| and |inactive_stats|
|
| @@ -211,11 +192,9 @@ class WebCacheManager : public content::NotificationObserver {
|
| // Returns |true| on success and |false| on failure. Does not modify
|
| // |strategy| on failure.
|
| bool AttemptTactic(AllocationTactic active_tactic,
|
| - uint64_t active_live_size,
|
| - uint64_t active_dead_size,
|
| + uint64_t active_size,
|
| AllocationTactic inactive_tactic,
|
| - uint64_t inactive_live_size,
|
| - uint64_t inactive_dead_size,
|
| + uint64_t inactive_size,
|
| AllocationStrategy* strategy);
|
|
|
| // For each renderer in |renderers|, computes its allocation according to
|
|
|