| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_QUOTA_USAGE_TRACKER_H_ | 5 #ifndef WEBKIT_QUOTA_USAGE_TRACKER_H_ |
| 6 #define WEBKIT_QUOTA_USAGE_TRACKER_H_ | 6 #define WEBKIT_QUOTA_USAGE_TRACKER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 struct TrackingInfo { | 56 struct TrackingInfo { |
| 57 TrackingInfo() : pending_clients(0), usage(0), unlimited_usage(0) {} | 57 TrackingInfo() : pending_clients(0), usage(0), unlimited_usage(0) {} |
| 58 int pending_clients; | 58 int pending_clients; |
| 59 int64 usage; | 59 int64 usage; |
| 60 int64 unlimited_usage; | 60 int64 unlimited_usage; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 typedef std::map<QuotaClient::ID, ClientUsageTracker*> ClientTrackerMap; | 63 typedef std::map<QuotaClient::ID, ClientUsageTracker*> ClientTrackerMap; |
| 64 | 64 |
| 65 friend class ClientUsageTracker; | 65 friend class ClientUsageTracker; |
| 66 void DidGetClientGlobalUsage(StorageType type, int64 usage, | 66 void DidGetClientGlobalUsage(int64 usage, |
| 67 int64 unlimited_usage); | 67 int64 unlimited_usage); |
| 68 void DidGetClientHostUsage(const std::string& host, | 68 void DidGetClientHostUsage(const std::string& host, |
| 69 StorageType type, | |
| 70 int64 usage); | 69 int64 usage); |
| 71 | 70 |
| 72 const StorageType type_; | 71 const StorageType type_; |
| 73 ClientTrackerMap client_tracker_map_; | 72 ClientTrackerMap client_tracker_map_; |
| 74 TrackingInfo global_usage_; | 73 TrackingInfo global_usage_; |
| 75 std::map<std::string, TrackingInfo> outstanding_host_usage_; | 74 std::map<std::string, TrackingInfo> outstanding_host_usage_; |
| 76 | 75 |
| 77 GlobalUsageCallbackQueue global_usage_callbacks_; | 76 GlobalUsageCallbackQueue global_usage_callbacks_; |
| 78 HostUsageCallbackMap host_usage_callbacks_; | 77 HostUsageCallbackMap host_usage_callbacks_; |
| 79 | 78 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 HostUsageCallbackMap host_usage_callbacks_; | 152 HostUsageCallbackMap host_usage_callbacks_; |
| 154 | 153 |
| 155 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; | 154 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; |
| 156 | 155 |
| 157 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker); | 156 DISALLOW_COPY_AND_ASSIGN(ClientUsageTracker); |
| 158 }; | 157 }; |
| 159 | 158 |
| 160 } // namespace quota | 159 } // namespace quota |
| 161 | 160 |
| 162 #endif // WEBKIT_QUOTA_USAGE_TRACKER_H_ | 161 #endif // WEBKIT_QUOTA_USAGE_TRACKER_H_ |
| OLD | NEW |