OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NETWOR
K_DELEGATE_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NETWOR
K_DELEGATE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/basictypes.h" | |
11 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "base/values.h" | 15 #include "base/values.h" |
14 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr
ics.h" | 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr
ics.h" |
15 #include "net/base/layered_network_delegate.h" | 17 #include "net/base/layered_network_delegate.h" |
16 #include "net/proxy/proxy_retry_info.h" | 18 #include "net/proxy/proxy_retry_info.h" |
17 | 19 |
18 class GURL; | 20 class GURL; |
19 | 21 |
20 namespace net { | 22 namespace net { |
21 class HttpResponseHeaders; | 23 class HttpResponseHeaders; |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 104 |
103 // Indicates that the URL request has been completed or failed. | 105 // Indicates that the URL request has been completed or failed. |
104 // |started| indicates whether the request has been started. If false, | 106 // |started| indicates whether the request has been started. If false, |
105 // some information like the socket address is not available. | 107 // some information like the socket address is not available. |
106 void OnCompletedInternal(net::URLRequest* request, | 108 void OnCompletedInternal(net::URLRequest* request, |
107 bool started) override; | 109 bool started) override; |
108 | 110 |
109 // Posts to the UI thread to UpdateContentLengthPrefs in the data reduction | 111 // Posts to the UI thread to UpdateContentLengthPrefs in the data reduction |
110 // proxy metrics and updates |received_content_length_| and | 112 // proxy metrics and updates |received_content_length_| and |
111 // |original_content_length_|. | 113 // |original_content_length_|. |
112 void AccumulateDataUsage(int64 data_used, | 114 void AccumulateDataUsage(int64_t data_used, |
113 int64 original_size, | 115 int64_t original_size, |
114 DataReductionProxyRequestType request_type, | 116 DataReductionProxyRequestType request_type, |
115 const std::string& data_usage_host, | 117 const std::string& data_usage_host, |
116 const std::string& mime_type); | 118 const std::string& mime_type); |
117 | 119 |
118 // Total size of all content that has been received over the network. | 120 // Total size of all content that has been received over the network. |
119 int64 total_received_bytes_; | 121 int64_t total_received_bytes_; |
120 | 122 |
121 // Total original size of all content before it was transferred. | 123 // Total original size of all content before it was transferred. |
122 int64 total_original_received_bytes_; | 124 int64_t total_original_received_bytes_; |
123 | 125 |
124 // All raw Data Reduction Proxy pointers must outlive |this|. | 126 // All raw Data Reduction Proxy pointers must outlive |this|. |
125 DataReductionProxyConfig* data_reduction_proxy_config_; | 127 DataReductionProxyConfig* data_reduction_proxy_config_; |
126 | 128 |
127 DataReductionProxyBypassStats* data_reduction_proxy_bypass_stats_; | 129 DataReductionProxyBypassStats* data_reduction_proxy_bypass_stats_; |
128 | 130 |
129 DataReductionProxyRequestOptions* data_reduction_proxy_request_options_; | 131 DataReductionProxyRequestOptions* data_reduction_proxy_request_options_; |
130 | 132 |
131 DataReductionProxyIOData* data_reduction_proxy_io_data_; | 133 DataReductionProxyIOData* data_reduction_proxy_io_data_; |
132 | 134 |
(...skipping 17 matching lines...) Expand all Loading... |
150 void OnResolveProxyHandler(const GURL& url, | 152 void OnResolveProxyHandler(const GURL& url, |
151 int load_flags, | 153 int load_flags, |
152 const net::ProxyConfig& data_reduction_proxy_config, | 154 const net::ProxyConfig& data_reduction_proxy_config, |
153 const net::ProxyRetryInfoMap& proxy_retry_info, | 155 const net::ProxyRetryInfoMap& proxy_retry_info, |
154 const DataReductionProxyConfig* config, | 156 const DataReductionProxyConfig* config, |
155 net::ProxyInfo* result); | 157 net::ProxyInfo* result); |
156 | 158 |
157 } // namespace data_reduction_proxy | 159 } // namespace data_reduction_proxy |
158 | 160 |
159 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NET
WORK_DELEGATE_H_ | 161 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_NET
WORK_DELEGATE_H_ |
OLD | NEW |