| 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_BYPASS
_STATS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS
_STATS_H_ |
| 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS
_STATS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYPASS
_STATS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "base/callback.h" | 10 #include "base/callback.h" |
| 9 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/macros.h" |
| 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" | 13 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
| 11 #include "net/base/host_port_pair.h" | 14 #include "net/base/host_port_pair.h" |
| 12 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
| 13 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
| 14 | 17 |
| 15 namespace net { | 18 namespace net { |
| 16 class HttpResponseHeaders; | 19 class HttpResponseHeaders; |
| 17 class ProxyConfig; | 20 class ProxyConfig; |
| 18 class ProxyServer; | 21 class ProxyServer; |
| 19 } | 22 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 120 |
| 118 // Records UMA of the number of response bytes of responses that are expected | 121 // Records UMA of the number of response bytes of responses that are expected |
| 119 // to have the data reduction proxy via header, but where the data reduction | 122 // to have the data reduction proxy via header, but where the data reduction |
| 120 // proxy via header is not present. | 123 // proxy via header is not present. |
| 121 void RecordMissingViaHeaderBytes(const net::URLRequest& request); | 124 void RecordMissingViaHeaderBytes(const net::URLRequest& request); |
| 122 | 125 |
| 123 // NetworkChangeNotifier::NetworkChangeObserver: | 126 // NetworkChangeNotifier::NetworkChangeObserver: |
| 124 void OnNetworkChanged( | 127 void OnNetworkChanged( |
| 125 net::NetworkChangeNotifier::ConnectionType type) override; | 128 net::NetworkChangeNotifier::ConnectionType type) override; |
| 126 | 129 |
| 127 void RecordBypassedBytes( | 130 void RecordBypassedBytes(DataReductionProxyBypassType bypass_type, |
| 128 DataReductionProxyBypassType bypass_type, | 131 BypassedBytesType bypassed_bytes_type, |
| 129 BypassedBytesType bypassed_bytes_type, | 132 int64_t content_length); |
| 130 int64 content_length); | |
| 131 | 133 |
| 132 DataReductionProxyConfig* data_reduction_proxy_config_; | 134 DataReductionProxyConfig* data_reduction_proxy_config_; |
| 133 | 135 |
| 134 UnreachableCallback unreachable_callback_; | 136 UnreachableCallback unreachable_callback_; |
| 135 | 137 |
| 136 // The last reason for bypass as determined by | 138 // The last reason for bypass as determined by |
| 137 // MaybeBypassProxyAndPrepareToRetry | 139 // MaybeBypassProxyAndPrepareToRetry |
| 138 DataReductionProxyBypassType last_bypass_type_; | 140 DataReductionProxyBypassType last_bypass_type_; |
| 139 // True if the last request triggered the current bypass. | 141 // True if the last request triggered the current bypass. |
| 140 bool triggering_request_; | 142 bool triggering_request_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 154 | 156 |
| 155 // Whether or not the data reduction proxy is unavailable. | 157 // Whether or not the data reduction proxy is unavailable. |
| 156 bool unavailable_; | 158 bool unavailable_; |
| 157 | 159 |
| 158 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassStats); | 160 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassStats); |
| 159 }; | 161 }; |
| 160 | 162 |
| 161 } // namespace data_reduction_proxy | 163 } // namespace data_reduction_proxy |
| 162 | 164 |
| 163 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYP
ASS_STATS_H_ | 165 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_BYP
ASS_STATS_H_ |
| OLD | NEW |