OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S
TORE_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S
TORE_TEST_UTILS_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S
TORE_TEST_UTILS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVENT_S
TORE_TEST_UTILS_H_ |
7 | 7 |
8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate.h" | 8 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_storage_delegate.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include <stdint.h> |
| 11 |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class Value; | 15 class Value; |
15 } | 16 } |
16 | 17 |
17 namespace data_reduction_proxy { | 18 namespace data_reduction_proxy { |
18 | 19 |
19 class TestDataReductionProxyEventStorageDelegate | 20 class TestDataReductionProxyEventStorageDelegate |
20 : public DataReductionProxyEventStorageDelegate { | 21 : public DataReductionProxyEventStorageDelegate { |
21 public: | 22 public: |
22 TestDataReductionProxyEventStorageDelegate(); | 23 TestDataReductionProxyEventStorageDelegate(); |
23 | 24 |
24 virtual ~TestDataReductionProxyEventStorageDelegate(); | 25 virtual ~TestDataReductionProxyEventStorageDelegate(); |
25 | 26 |
26 // Sets |delegate_| at a later point in time. | 27 // Sets |delegate_| at a later point in time. |
27 void SetStorageDelegate(DataReductionProxyEventStorageDelegate* delegate); | 28 void SetStorageDelegate(DataReductionProxyEventStorageDelegate* delegate); |
28 | 29 |
29 // Overrides of DataReductionProxyEventStorageDelegate: | 30 // Overrides of DataReductionProxyEventStorageDelegate: |
30 void AddEvent(scoped_ptr<base::Value> event) override; | 31 void AddEvent(scoped_ptr<base::Value> event) override; |
31 void AddEnabledEvent(scoped_ptr<base::Value> event, bool enabled) override; | 32 void AddEnabledEvent(scoped_ptr<base::Value> event, bool enabled) override; |
32 void AddAndSetLastBypassEvent(scoped_ptr<base::Value> event, | 33 void AddAndSetLastBypassEvent(scoped_ptr<base::Value> event, |
33 int64 expiration_ticks) override; | 34 int64_t expiration_ticks) override; |
34 void AddEventAndSecureProxyCheckState(scoped_ptr<base::Value> event, | 35 void AddEventAndSecureProxyCheckState(scoped_ptr<base::Value> event, |
35 SecureProxyCheckState state) override; | 36 SecureProxyCheckState state) override; |
36 | 37 |
37 private: | 38 private: |
38 // If not null, |this| will send DataReductionProxyEventStorageDelegate | 39 // If not null, |this| will send DataReductionProxyEventStorageDelegate |
39 // calls to |delegate_|. | 40 // calls to |delegate_|. |
40 DataReductionProxyEventStorageDelegate* delegate_; | 41 DataReductionProxyEventStorageDelegate* delegate_; |
41 }; | 42 }; |
42 | 43 |
43 } // namespace data_reduction_proxy | 44 } // namespace data_reduction_proxy |
44 | 45 |
45 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVEN
T_STORE_TEST_UTILS_H_ | 46 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_EVEN
T_STORE_TEST_UTILS_H_ |
OLD | NEW |