| 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_CONFIG
_SERVICE_CLIENT_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_SERVICE_CLIENT_H_ |
| 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_SERVICE_CLIENT_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CONFIG
_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // operation takes place asynchronously. | 113 // operation takes place asynchronously. |
| 114 void RetrieveConfig(); | 114 void RetrieveConfig(); |
| 115 | 115 |
| 116 // Takes a serialized Data Reduction Proxy configuration and sets it as the | 116 // Takes a serialized Data Reduction Proxy configuration and sets it as the |
| 117 // current Data Reduction Proxy configuration. If a remote configuration has | 117 // current Data Reduction Proxy configuration. If a remote configuration has |
| 118 // already been retrieved, the remote configuration takes precedence. | 118 // already been retrieved, the remote configuration takes precedence. |
| 119 void ApplySerializedConfig(const std::string& config_value); | 119 void ApplySerializedConfig(const std::string& config_value); |
| 120 | 120 |
| 121 // Examines |response_headers| to determine if an authentication failure | 121 // Examines |response_headers| to determine if an authentication failure |
| 122 // occurred on a Data Reduction Proxy. Returns true if authentication failure | 122 // occurred on a Data Reduction Proxy. Returns true if authentication failure |
| 123 // occured, and the session key specified in |request_headers| matches the | 123 // occurred, and the session key specified in |request_headers| matches the |
| 124 // current session in use by the client. If an authentication failure is | 124 // current session in use by the client. If an authentication failure is |
| 125 // detected, it fetches a new config. | 125 // detected, it fetches a new config. |
| 126 bool ShouldRetryDueToAuthFailure( | 126 bool ShouldRetryDueToAuthFailure( |
| 127 const net::HttpRequestHeaders& request_headers, | 127 const net::HttpRequestHeaders& request_headers, |
| 128 const net::HttpResponseHeaders* response_headers, | 128 const net::HttpResponseHeaders* response_headers, |
| 129 const net::ProxyServer& proxy_server, | 129 const net::ProxyServer& proxy_server, |
| 130 const net::LoadTimingInfo& load_timing_info); | 130 const net::LoadTimingInfo& load_timing_info); |
| 131 | 131 |
| 132 protected: | 132 protected: |
| 133 // Retrieves the backoff entry object being used to throttle request failures. | 133 // Retrieves the backoff entry object being used to throttle request failures. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 bool fetch_in_progress_; | 280 bool fetch_in_progress_; |
| 281 | 281 |
| 282 // Enforce usage on the IO thread. | 282 // Enforce usage on the IO thread. |
| 283 base::ThreadChecker thread_checker_; | 283 base::ThreadChecker thread_checker_; |
| 284 | 284 |
| 285 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfigServiceClient); | 285 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyConfigServiceClient); |
| 286 }; | 286 }; |
| 287 | 287 |
| 288 } // namespace data_reduction_proxy | 288 } // namespace data_reduction_proxy |
| 289 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON
FIG_SERVICE_CLIENT_H_ | 289 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_CON
FIG_SERVICE_CLIENT_H_ |
| OLD | NEW |