OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 5 #ifndef WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
6 #define WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 6 #define WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 MockQuotaManagerProxy(MockQuotaManager* quota_manager, | 144 MockQuotaManagerProxy(MockQuotaManager* quota_manager, |
145 base::SingleThreadTaskRunner* task_runner); | 145 base::SingleThreadTaskRunner* task_runner); |
146 | 146 |
147 virtual void RegisterClient(QuotaClient* client) OVERRIDE; | 147 virtual void RegisterClient(QuotaClient* client) OVERRIDE; |
148 | 148 |
149 void SimulateQuotaManagerDestroyed(); | 149 void SimulateQuotaManagerDestroyed(); |
150 | 150 |
151 // We don't mock them. | 151 // We don't mock them. |
152 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {} | 152 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {} |
153 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {} | 153 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {} |
| 154 virtual void SetUsageCacheEnabled(QuotaClient::ID client_id, |
| 155 const GURL& origin, |
| 156 StorageType type, |
| 157 bool enabled) OVERRIDE {} |
| 158 virtual void GetUsageAndQuota( |
| 159 base::SequencedTaskRunner* original_task_runner, |
| 160 const GURL& origin, |
| 161 StorageType type, |
| 162 const QuotaManager::GetUsageAndQuotaCallback& callback) OVERRIDE {} |
154 | 163 |
155 // Validates the |client_id| and updates the internal access count | 164 // Validates the |client_id| and updates the internal access count |
156 // which can be accessed via notify_storage_accessed_count(). | 165 // which can be accessed via notify_storage_accessed_count(). |
157 // The also records the |origin| and |type| in last_notified_origin_ and | 166 // The also records the |origin| and |type| in last_notified_origin_ and |
158 // last_notified_type_. | 167 // last_notified_type_. |
159 virtual void NotifyStorageAccessed(QuotaClient::ID client_id, | 168 virtual void NotifyStorageAccessed(QuotaClient::ID client_id, |
160 const GURL& origin, | 169 const GURL& origin, |
161 StorageType type) OVERRIDE; | 170 StorageType type) OVERRIDE; |
162 | 171 |
163 // Records the |origin|, |type| and |delta| as last_notified_origin_, | 172 // Records the |origin|, |type| and |delta| as last_notified_origin_, |
(...skipping 24 matching lines...) Expand all Loading... |
188 GURL last_notified_origin_; | 197 GURL last_notified_origin_; |
189 StorageType last_notified_type_; | 198 StorageType last_notified_type_; |
190 int64 last_notified_delta_; | 199 int64 last_notified_delta_; |
191 | 200 |
192 QuotaClient* registered_client_; | 201 QuotaClient* registered_client_; |
193 }; | 202 }; |
194 | 203 |
195 } // namespace quota | 204 } // namespace quota |
196 | 205 |
197 #endif // WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ | 206 #endif // WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ |
OLD | NEW |