OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 void ResetStateForRestart(); | 262 void ResetStateForRestart(); |
263 | 263 |
264 // Resets the members of the transaction, except |stream_|, which needs | 264 // Resets the members of the transaction, except |stream_|, which needs |
265 // to be maintained for multi-round auth. | 265 // to be maintained for multi-round auth. |
266 void ResetStateForAuthRestart(); | 266 void ResetStateForAuthRestart(); |
267 | 267 |
268 // Caches network error details from the stream if available | 268 // Caches network error details from the stream if available |
269 // and resets the stream. | 269 // and resets the stream. |
270 void CacheNetErrorDetailsAndResetStream(); | 270 void CacheNetErrorDetailsAndResetStream(); |
271 | 271 |
272 // Records metrics relating to SSL fallbacks. | |
273 void RecordSSLFallbackMetrics(int result); | |
274 | |
275 // Returns true if we should try to add a Proxy-Authorization header | 272 // Returns true if we should try to add a Proxy-Authorization header |
276 bool ShouldApplyProxyAuth() const; | 273 bool ShouldApplyProxyAuth() const; |
277 | 274 |
278 // Returns true if we should try to add an Authorization header. | 275 // Returns true if we should try to add an Authorization header. |
279 bool ShouldApplyServerAuth() const; | 276 bool ShouldApplyServerAuth() const; |
280 | 277 |
281 // Handles HTTP status code 401 or 407. | 278 // Handles HTTP status code 401 or 407. |
282 // HandleAuthChallenge() returns a network error code, or OK on success. | 279 // HandleAuthChallenge() returns a network error code, or OK on success. |
283 // May update |pending_auth_target_| or |response_.auth_challenge|. | 280 // May update |pending_auth_target_| or |response_.auth_challenge|. |
284 int HandleAuthChallenge(); | 281 int HandleAuthChallenge(); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 // Communicate lifetime of transaction to the throttler, and | 397 // Communicate lifetime of transaction to the throttler, and |
401 // throttled state to the transaction. | 398 // throttled state to the transaction. |
402 std::unique_ptr<NetworkThrottleManager::Throttle> throttle_; | 399 std::unique_ptr<NetworkThrottleManager::Throttle> throttle_; |
403 | 400 |
404 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); | 401 DISALLOW_COPY_AND_ASSIGN(HttpNetworkTransaction); |
405 }; | 402 }; |
406 | 403 |
407 } // namespace net | 404 } // namespace net |
408 | 405 |
409 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 406 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
OLD | NEW |