| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Removes an origin from the canned list of origins, but doesn't touch | 65 // Removes an origin from the canned list of origins, but doesn't touch |
| 66 // anything on disk. The caller must provide |quota_client_mask| which | 66 // anything on disk. The caller must provide |quota_client_mask| which |
| 67 // specifies the types of QuotaClients which should be removed from this | 67 // specifies the types of QuotaClients which should be removed from this |
| 68 // origin as a bitmask built from QuotaClient::IDs. Setting the mask to | 68 // origin as a bitmask built from QuotaClient::IDs. Setting the mask to |
| 69 // QuotaClient::kAllClientsMask will remove all clients from the origin, | 69 // QuotaClient::kAllClientsMask will remove all clients from the origin, |
| 70 // regardless of type. | 70 // regardless of type. |
| 71 void DeleteOriginData(const GURL& origin, | 71 void DeleteOriginData(const GURL& origin, |
| 72 StorageType type, | 72 StorageType type, |
| 73 int quota_client_mask, | 73 int quota_client_mask, |
| 74 bool is_eviction, |
| 74 const StatusCallback& callback) override; | 75 const StatusCallback& callback) override; |
| 75 | 76 |
| 76 // Helper method for updating internal quota info. | 77 // Helper method for updating internal quota info. |
| 77 void SetQuota(const GURL& origin, StorageType type, int64 quota); | 78 void SetQuota(const GURL& origin, StorageType type, int64 quota); |
| 78 | 79 |
| 79 // Helper methods for timed-deletion testing: | 80 // Helper methods for timed-deletion testing: |
| 80 // Adds an origin to the canned list that will be searched through via | 81 // Adds an origin to the canned list that will be searched through via |
| 81 // GetOriginsModifiedSince. The caller must provide |quota_client_mask| | 82 // GetOriginsModifiedSince. The caller must provide |quota_client_mask| |
| 82 // which specifies the types of QuotaClients this canned origin contains | 83 // which specifies the types of QuotaClients this canned origin contains |
| 83 // as a bitmask built from QuotaClient::IDs. | 84 // as a bitmask built from QuotaClient::IDs. |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 std::vector<OriginInfo> origins_; | 143 std::vector<OriginInfo> origins_; |
| 143 UsageAndQuotaMap usage_and_quota_map_; | 144 UsageAndQuotaMap usage_and_quota_map_; |
| 144 base::WeakPtrFactory<MockQuotaManager> weak_factory_; | 145 base::WeakPtrFactory<MockQuotaManager> weak_factory_; |
| 145 | 146 |
| 146 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager); | 147 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager); |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 } // namespace content | 150 } // namespace content |
| 150 | 151 |
| 151 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 152 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
| OLD | NEW |