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 15 matching lines...) Expand all Loading... | |
26 }; | 26 }; |
27 | 27 |
28 // Mock storage class for testing. | 28 // Mock storage class for testing. |
29 class MockStorageClient : public QuotaClient { | 29 class MockStorageClient : public QuotaClient { |
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 NotifyAllOrigins(); | |
kinuko
2011/08/02 09:09:30
nit: please move this method above the comment '//
tzik
2011/08/03 04:15:00
Done.
| |
36 void AddOriginAndNotify( | 37 void AddOriginAndNotify( |
37 const GURL& origin_url, StorageType type, int64 size); | 38 const GURL& origin_url, StorageType type, int64 size); |
38 void ModifyOriginAndNotify( | 39 void ModifyOriginAndNotify( |
39 const GURL& origin_url, StorageType type, int64 delta); | 40 const GURL& origin_url, StorageType type, int64 delta); |
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. |
(...skipping 38 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 |