| Index: webkit/appcache/appcache_storage.h
|
| ===================================================================
|
| --- webkit/appcache/appcache_storage.h (revision 87543)
|
| +++ webkit/appcache/appcache_storage.h (working copy)
|
| @@ -31,6 +31,7 @@
|
|
|
| class AppCacheStorage {
|
| public:
|
| + typedef std::map<GURL, int64> UsageMap;
|
|
|
| class Delegate {
|
| public:
|
| @@ -180,6 +181,9 @@
|
| // The working set of object instances currently in memory.
|
| AppCacheWorkingSet* working_set() { return &working_set_; }
|
|
|
| + // A map of origins to usage.
|
| + const UsageMap* usage_map() { return &usage_map_; }
|
| +
|
| // Simple ptr back to the service object that owns us.
|
| AppCacheService* service() { return service_; }
|
|
|
| @@ -280,11 +284,16 @@
|
| return ++last_response_id_;
|
| }
|
|
|
| + // Helpers to query and notify the QuotaManager.
|
| + void UpdateUsageMapAndNotify(const GURL& origin, int64 new_usage);
|
| + void NotifyStorageAccessed(const GURL& origin);
|
| +
|
| // The last storage id used for different object types.
|
| int64 last_cache_id_;
|
| int64 last_group_id_;
|
| int64 last_response_id_;
|
|
|
| + UsageMap usage_map_; // maps origin to usage
|
| AppCacheWorkingSet working_set_;
|
| AppCacheService* service_;
|
| DelegateReferenceMap delegate_references_;
|
|
|