| 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_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> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 base::MessageLoopProxy* db_thread, | 92 base::MessageLoopProxy* db_thread, |
| 93 SpecialStoragePolicy* special_storage_policy); | 93 SpecialStoragePolicy* special_storage_policy); |
| 94 | 94 |
| 95 virtual ~QuotaManager(); | 95 virtual ~QuotaManager(); |
| 96 | 96 |
| 97 // Returns a proxy object that can be used on any thread. | 97 // Returns a proxy object that can be used on any thread. |
| 98 QuotaManagerProxy* proxy() { return proxy_.get(); } | 98 QuotaManagerProxy* proxy() { return proxy_.get(); } |
| 99 | 99 |
| 100 // Called by clients or webapps. | 100 // Called by clients or webapps. |
| 101 // This method is declared as virtual to allow test code to override it. | 101 // This method is declared as virtual to allow test code to override it. |
| 102 // note: returns host usage and quota |
| 102 virtual void GetUsageAndQuota(const GURL& origin, | 103 virtual void GetUsageAndQuota(const GURL& origin, |
| 103 StorageType type, | 104 StorageType type, |
| 104 GetUsageAndQuotaCallback* callback); | 105 GetUsageAndQuotaCallback* callback); |
| 105 | 106 |
| 106 // Called by clients via proxy. | 107 // Called by clients via proxy. |
| 107 // Client storage should call this method when storage is accessed. | 108 // Client storage should call this method when storage is accessed. |
| 108 // Used to maintain LRU ordering. | 109 // Used to maintain LRU ordering. |
| 109 void NotifyStorageAccessed(QuotaClient::ID client_id, | 110 void NotifyStorageAccessed(QuotaClient::ID client_id, |
| 110 const GURL& origin, | 111 const GURL& origin, |
| 111 StorageType type); | 112 StorageType type); |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 390 |
| 390 QuotaManager* manager_; // only accessed on the io thread | 391 QuotaManager* manager_; // only accessed on the io thread |
| 391 scoped_refptr<base::MessageLoopProxy> io_thread_; | 392 scoped_refptr<base::MessageLoopProxy> io_thread_; |
| 392 | 393 |
| 393 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); | 394 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); |
| 394 }; | 395 }; |
| 395 | 396 |
| 396 } // namespace quota | 397 } // namespace quota |
| 397 | 398 |
| 398 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ | 399 #endif // WEBKIT_QUOTA_QUOTA_MANAGER_H_ |
| OLD | NEW |