| 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 // This file declares HttpCache::Transaction, a private class of HttpCache so | 5 // This file declares HttpCache::Transaction, a private class of HttpCache so |
| 6 // it should only be included by http_cache.cc | 6 // it should only be included by http_cache.cc |
| 7 | 7 |
| 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 8 #ifndef NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 9 #define NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| 10 | 10 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 void UpdateCacheEntryStatus( | 427 void UpdateCacheEntryStatus( |
| 428 HttpResponseInfo::CacheEntryStatus new_cache_entry_status); | 428 HttpResponseInfo::CacheEntryStatus new_cache_entry_status); |
| 429 | 429 |
| 430 // Sets the response.cache_entry_status to the current cache_entry_status_. | 430 // Sets the response.cache_entry_status to the current cache_entry_status_. |
| 431 void SyncCacheEntryStatusToResponse(); | 431 void SyncCacheEntryStatusToResponse(); |
| 432 void RecordHistograms(); | 432 void RecordHistograms(); |
| 433 | 433 |
| 434 // Called to signal completion of asynchronous IO. | 434 // Called to signal completion of asynchronous IO. |
| 435 void OnIOComplete(int result); | 435 void OnIOComplete(int result); |
| 436 | 436 |
| 437 // When in a DoLoop, use this to set the next state as it verifies that the |
| 438 // state isn't set twice. |
| 439 void TransitionToState(State state); |
| 440 |
| 437 State next_state_; | 441 State next_state_; |
| 438 const HttpRequestInfo* request_; | 442 const HttpRequestInfo* request_; |
| 439 RequestPriority priority_; | 443 RequestPriority priority_; |
| 440 NetLogWithSource net_log_; | 444 NetLogWithSource net_log_; |
| 441 std::unique_ptr<HttpRequestInfo> custom_request_; | 445 std::unique_ptr<HttpRequestInfo> custom_request_; |
| 442 HttpRequestHeaders request_headers_copy_; | 446 HttpRequestHeaders request_headers_copy_; |
| 443 // If extra_headers specified a "if-modified-since" or "if-none-match", | 447 // If extra_headers specified a "if-modified-since" or "if-none-match", |
| 444 // |external_validation_| contains the value of those headers. | 448 // |external_validation_| contains the value of those headers. |
| 445 ValidationHeaders external_validation_; | 449 ValidationHeaders external_validation_; |
| 446 base::WeakPtr<HttpCache> cache_; | 450 base::WeakPtr<HttpCache> cache_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 // The helper object to use to create WebSocketHandshakeStreamBase | 505 // The helper object to use to create WebSocketHandshakeStreamBase |
| 502 // objects. Only relevant when establishing a WebSocket connection. | 506 // objects. Only relevant when establishing a WebSocket connection. |
| 503 // This is passed to the underlying network transaction. It is stored here in | 507 // This is passed to the underlying network transaction. It is stored here in |
| 504 // case the transaction does not exist yet. | 508 // case the transaction does not exist yet. |
| 505 WebSocketHandshakeStreamBase::CreateHelper* | 509 WebSocketHandshakeStreamBase::CreateHelper* |
| 506 websocket_handshake_stream_base_create_helper_; | 510 websocket_handshake_stream_base_create_helper_; |
| 507 | 511 |
| 508 BeforeNetworkStartCallback before_network_start_callback_; | 512 BeforeNetworkStartCallback before_network_start_callback_; |
| 509 BeforeHeadersSentCallback before_headers_sent_callback_; | 513 BeforeHeadersSentCallback before_headers_sent_callback_; |
| 510 | 514 |
| 515 // True if the Transaction is currently processing the DoLoop. |
| 516 bool in_do_loop_; |
| 517 |
| 511 base::WeakPtrFactory<Transaction> weak_factory_; | 518 base::WeakPtrFactory<Transaction> weak_factory_; |
| 512 | 519 |
| 513 DISALLOW_COPY_AND_ASSIGN(Transaction); | 520 DISALLOW_COPY_AND_ASSIGN(Transaction); |
| 514 }; | 521 }; |
| 515 | 522 |
| 516 } // namespace net | 523 } // namespace net |
| 517 | 524 |
| 518 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 525 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
| OLD | NEW |