OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUOTA_MANAGER_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 6 #define WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <list> | 10 #include <list> |
11 #include <map> | 11 #include <map> |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 | 141 |
142 // Used to avoid evicting origins with open pages. | 142 // Used to avoid evicting origins with open pages. |
143 // A call to NotifyOriginInUse must be balanced by a later call | 143 // A call to NotifyOriginInUse must be balanced by a later call |
144 // to NotifyOriginNoLongerInUse. | 144 // to NotifyOriginNoLongerInUse. |
145 void NotifyOriginInUse(const GURL& origin); | 145 void NotifyOriginInUse(const GURL& origin); |
146 void NotifyOriginNoLongerInUse(const GURL& origin); | 146 void NotifyOriginNoLongerInUse(const GURL& origin); |
147 bool IsOriginInUse(const GURL& origin) const { | 147 bool IsOriginInUse(const GURL& origin) const { |
148 return origins_in_use_.find(origin) != origins_in_use_.end(); | 148 return origins_in_use_.find(origin) != origins_in_use_.end(); |
149 } | 149 } |
150 | 150 |
151 // Called by UI. | 151 // Called by UI. |
kinuko
2012/01/19 13:53:11
Can we add a brief comment about the quota_client_
Mike West
2012/01/19 16:51:00
Done.
| |
152 virtual void DeleteOriginData(const GURL& origin, | 152 virtual void DeleteOriginData(const GURL& origin, |
153 StorageType type, | 153 StorageType type, |
154 int quota_client_mask, | |
154 const StatusCallback& callback); | 155 const StatusCallback& callback); |
155 void DeleteHostData(const std::string& host, | 156 void DeleteHostData(const std::string& host, |
156 StorageType type, | 157 StorageType type, |
158 int quota_client_mask, | |
157 const StatusCallback& callback); | 159 const StatusCallback& callback); |
158 | 160 |
159 // Called by UI and internal modules. | 161 // Called by UI and internal modules. |
160 void GetAvailableSpace(const AvailableSpaceCallback& callback); | 162 void GetAvailableSpace(const AvailableSpaceCallback& callback); |
161 void GetTemporaryGlobalQuota(const QuotaCallback& callback); | 163 void GetTemporaryGlobalQuota(const QuotaCallback& callback); |
162 | 164 |
163 // Ok to call with NULL callback. | 165 // Ok to call with NULL callback. |
164 void SetTemporaryGlobalOverrideQuota(int64 new_quota, | 166 void SetTemporaryGlobalOverrideQuota(int64 new_quota, |
165 const QuotaCallback& callback); | 167 const QuotaCallback& callback); |
166 | 168 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
412 | 414 |
413 QuotaManager* manager_; // only accessed on the io thread | 415 QuotaManager* manager_; // only accessed on the io thread |
414 scoped_refptr<base::MessageLoopProxy> io_thread_; | 416 scoped_refptr<base::MessageLoopProxy> io_thread_; |
415 | 417 |
416 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); | 418 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); |
417 }; | 419 }; |
418 | 420 |
419 } // namespace quota | 421 } // namespace quota |
420 | 422 |
421 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 423 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
OLD | NEW |