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_MOCK_STORAGE_CLIENT_H_ | 5 #ifndef WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ | 6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 MockStorageClient(QuotaManagerProxy* quota_manager_proxy, | 31 MockStorageClient(QuotaManagerProxy* quota_manager_proxy, |
32 const MockOriginData* mock_data, size_t mock_data_size); | 32 const MockOriginData* mock_data, size_t mock_data_size); |
33 virtual ~MockStorageClient(); | 33 virtual ~MockStorageClient(); |
34 | 34 |
35 // To add or modify mock data in this client. | 35 // To add or modify mock data in this client. |
36 void AddOriginAndNotify( | 36 void AddOriginAndNotify( |
37 const GURL& origin_url, StorageType type, int64 size); | 37 const GURL& origin_url, StorageType type, int64 size); |
38 void ModifyOriginAndNotify( | 38 void ModifyOriginAndNotify( |
39 const GURL& origin_url, StorageType type, int64 delta); | 39 const GURL& origin_url, StorageType type, int64 delta); |
| 40 void TouchAllOriginsAndNotify(); |
40 | 41 |
41 void AddOriginToErrorSet(const GURL& origin_url, StorageType type); | 42 void AddOriginToErrorSet(const GURL& origin_url, StorageType type); |
42 | 43 |
43 base::Time IncrementMockTime(); | 44 base::Time IncrementMockTime(); |
44 | 45 |
45 // QuotaClient methods. | 46 // QuotaClient methods. |
46 virtual QuotaClient::ID id() const OVERRIDE; | 47 virtual QuotaClient::ID id() const OVERRIDE; |
47 virtual void OnQuotaManagerDestroyed() OVERRIDE; | 48 virtual void OnQuotaManagerDestroyed() OVERRIDE; |
48 virtual void GetOriginUsage(const GURL& origin_url, | 49 virtual void GetOriginUsage(const GURL& origin_url, |
49 StorageType type, | 50 StorageType type, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 int mock_time_counter_; | 85 int mock_time_counter_; |
85 | 86 |
86 ScopedRunnableMethodFactory<MockStorageClient> runnable_factory_; | 87 ScopedRunnableMethodFactory<MockStorageClient> runnable_factory_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(MockStorageClient); | 89 DISALLOW_COPY_AND_ASSIGN(MockStorageClient); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace quota | 92 } // namespace quota |
92 | 93 |
93 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ | 94 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
OLD | NEW |