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_BROWSER_DATA_REDUCTION_PROXY_IO_DAT
A_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT
A_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT
A_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DAT
A_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debu
g_ui_service.h" | 11 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debu
g_ui_service.h" |
12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_dele
gate.h" | 12 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_dele
gate.h" |
13 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" | 13 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw
ork_delegate.h" |
14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" | 14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_requ
est_options.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 class NetLog; | 17 class NetLog; |
18 class URLRequestInterceptor; | 18 class URLRequestInterceptor; |
19 } | 19 } |
20 | 20 |
21 namespace data_reduction_proxy { | 21 namespace data_reduction_proxy { |
22 | 22 |
23 class DataReductionProxyConfig; | 23 class DataReductionProxyConfig; |
24 class DataReductionProxyConfigServiceClient; | 24 class DataReductionProxyConfigServiceClient; |
25 class DataReductionProxyConfigurator; | 25 class DataReductionProxyConfigurator; |
26 class DataReductionProxyEventStore; | 26 class DataReductionProxyEventStore; |
27 class DataReductionProxyService; | 27 class DataReductionProxyService; |
28 class DataReductionProxyStatisticsPrefs; | 28 class DataReductionProxyStatisticsPrefs; |
29 class DataReductionProxyUsageStats; | 29 class DataReductionProxyBypassStats; |
30 | 30 |
31 // Contains and initializes all Data Reduction Proxy objects that operate on | 31 // Contains and initializes all Data Reduction Proxy objects that operate on |
32 // the IO thread. | 32 // the IO thread. |
33 class DataReductionProxyIOData { | 33 class DataReductionProxyIOData { |
34 public: | 34 public: |
35 // Constructs a DataReductionProxyIOData object. |param_flags| is used to | 35 // Constructs a DataReductionProxyIOData object. |param_flags| is used to |
36 // set information about the DNS names used by the proxy, and allowable | 36 // set information about the DNS names used by the proxy, and allowable |
37 // configurations. | 37 // configurations. |
38 DataReductionProxyIOData( | 38 DataReductionProxyIOData( |
39 const Client& client, | 39 const Client& client, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 net::NetLog* net_log() { | 94 net::NetLog* net_log() { |
95 return net_log_; | 95 return net_log_; |
96 } | 96 } |
97 | 97 |
98 base::WeakPtr<DataReductionProxyService> service() const { | 98 base::WeakPtr<DataReductionProxyService> service() const { |
99 return service_; | 99 return service_; |
100 } | 100 } |
101 | 101 |
102 // Used for testing. | 102 // Used for testing. |
103 DataReductionProxyUsageStats* usage_stats() const { | 103 DataReductionProxyBypassStats* bypass_stats() const { |
104 return usage_stats_.get(); | 104 return bypass_stats_.get(); |
105 } | 105 } |
106 | 106 |
107 DataReductionProxyDebugUIService* debug_ui_service() const { | 107 DataReductionProxyDebugUIService* debug_ui_service() const { |
108 return debug_ui_service_.get(); | 108 return debug_ui_service_.get(); |
109 } | 109 } |
110 | 110 |
111 void set_debug_ui_service( | 111 void set_debug_ui_service( |
112 scoped_ptr<DataReductionProxyDebugUIService> ui_service) const { | 112 scoped_ptr<DataReductionProxyDebugUIService> ui_service) const { |
113 debug_ui_service_= ui_service.Pass(); | 113 debug_ui_service_= ui_service.Pass(); |
114 } | 114 } |
(...skipping 24 matching lines...) Expand all Loading... |
139 scoped_ptr<DataReductionProxyConfigurator> configurator_; | 139 scoped_ptr<DataReductionProxyConfigurator> configurator_; |
140 | 140 |
141 // A proxy delegate. Used, for example, to add authentication to HTTP CONNECT | 141 // A proxy delegate. Used, for example, to add authentication to HTTP CONNECT |
142 // request. | 142 // request. |
143 scoped_ptr<DataReductionProxyDelegate> proxy_delegate_; | 143 scoped_ptr<DataReductionProxyDelegate> proxy_delegate_; |
144 | 144 |
145 // Data Reduction Proxy objects with a UI based lifetime. | 145 // Data Reduction Proxy objects with a UI based lifetime. |
146 base::WeakPtr<DataReductionProxyService> service_; | 146 base::WeakPtr<DataReductionProxyService> service_; |
147 | 147 |
148 // Tracker of various metrics to be reported in UMA. | 148 // Tracker of various metrics to be reported in UMA. |
149 scoped_ptr<DataReductionProxyUsageStats> usage_stats_; | 149 scoped_ptr<DataReductionProxyBypassStats> bypass_stats_; |
150 | 150 |
151 // Constructs credentials suitable for authenticating the client. | 151 // Constructs credentials suitable for authenticating the client. |
152 scoped_ptr<DataReductionProxyRequestOptions> request_options_; | 152 scoped_ptr<DataReductionProxyRequestOptions> request_options_; |
153 | 153 |
154 // Requests new Data Reduction Proxy configurations from a remote service. | 154 // Requests new Data Reduction Proxy configurations from a remote service. |
155 scoped_ptr<DataReductionProxyConfigServiceClient> config_client_; | 155 scoped_ptr<DataReductionProxyConfigServiceClient> config_client_; |
156 | 156 |
157 // A net log. | 157 // A net log. |
158 net::NetLog* net_log_; | 158 net::NetLog* net_log_; |
159 | 159 |
160 // IO and UI task runners, respectively. | 160 // IO and UI task runners, respectively. |
161 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 161 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
162 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 162 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
163 | 163 |
164 // Used | 164 // Used |
165 bool shutdown_on_ui_; | 165 bool shutdown_on_ui_; |
166 | 166 |
167 // Preference that determines if the Data Reduction Proxy has been enabled | 167 // Preference that determines if the Data Reduction Proxy has been enabled |
168 // by the user. In practice, this can be overridden by the command line. | 168 // by the user. In practice, this can be overridden by the command line. |
169 BooleanPrefMember enabled_; | 169 BooleanPrefMember enabled_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData); | 171 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData); |
172 }; | 172 }; |
173 | 173 |
174 } // namespace data_reduction_proxy | 174 } // namespace data_reduction_proxy |
175 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_
DATA_H_ | 175 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_
DATA_H_ |
176 | 176 |
OLD | NEW |