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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int RestartWithCertificate(X509Certificate* client_cert, | 135 int RestartWithCertificate(X509Certificate* client_cert, |
136 const CompletionCallback& callback) override; | 136 const CompletionCallback& callback) override; |
137 int RestartWithAuth(const AuthCredentials& credentials, | 137 int RestartWithAuth(const AuthCredentials& credentials, |
138 const CompletionCallback& callback) override; | 138 const CompletionCallback& callback) override; |
139 bool IsReadyToRestartForAuth() override; | 139 bool IsReadyToRestartForAuth() override; |
140 int Read(IOBuffer* buf, | 140 int Read(IOBuffer* buf, |
141 int buf_len, | 141 int buf_len, |
142 const CompletionCallback& callback) override; | 142 const CompletionCallback& callback) override; |
143 void StopCaching() override; | 143 void StopCaching() override; |
144 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; | 144 bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override; |
145 int64 GetTotalReceivedBytes() const override; | 145 int64_t GetTotalReceivedBytes() const override; |
146 int64_t GetTotalSentBytes() const override; | 146 int64_t GetTotalSentBytes() const override; |
147 void DoneReading() override; | 147 void DoneReading() override; |
148 const HttpResponseInfo* GetResponseInfo() const override; | 148 const HttpResponseInfo* GetResponseInfo() const override; |
149 LoadState GetLoadState() const override; | 149 LoadState GetLoadState() const override; |
150 UploadProgress GetUploadProgress(void) const override; | 150 UploadProgress GetUploadProgress(void) const override; |
151 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; | 151 void SetQuicServerInfo(QuicServerInfo* quic_server_info) override; |
152 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; | 152 bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override; |
153 void SetPriority(RequestPriority priority) override; | 153 void SetPriority(RequestPriority priority) override; |
154 void SetWebSocketHandshakeStreamCreateHelper( | 154 void SetWebSocketHandshakeStreamCreateHelper( |
155 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; | 155 WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 scoped_ptr<PartialData> partial_; // We are dealing with range requests. | 463 scoped_ptr<PartialData> partial_; // We are dealing with range requests. |
464 UploadProgress final_upload_progress_; | 464 UploadProgress final_upload_progress_; |
465 CompletionCallback io_callback_; | 465 CompletionCallback io_callback_; |
466 | 466 |
467 // Members used to track data for histograms. | 467 // Members used to track data for histograms. |
468 TransactionPattern transaction_pattern_; | 468 TransactionPattern transaction_pattern_; |
469 base::TimeTicks entry_lock_waiting_since_; | 469 base::TimeTicks entry_lock_waiting_since_; |
470 base::TimeTicks first_cache_access_since_; | 470 base::TimeTicks first_cache_access_since_; |
471 base::TimeTicks send_request_since_; | 471 base::TimeTicks send_request_since_; |
472 | 472 |
473 int64 total_received_bytes_; | 473 int64_t total_received_bytes_; |
474 int64_t total_sent_bytes_; | 474 int64_t total_sent_bytes_; |
475 | 475 |
476 // Load timing information for the last network request, if any. Set in the | 476 // Load timing information for the last network request, if any. Set in the |
477 // 304 and 206 response cases, as the network transaction may be destroyed | 477 // 304 and 206 response cases, as the network transaction may be destroyed |
478 // before the caller requests load timing information. | 478 // before the caller requests load timing information. |
479 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_; | 479 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_; |
480 | 480 |
481 ConnectionAttempts old_connection_attempts_; | 481 ConnectionAttempts old_connection_attempts_; |
482 | 482 |
483 // The helper object to use to create WebSocketHandshakeStreamBase | 483 // The helper object to use to create WebSocketHandshakeStreamBase |
484 // objects. Only relevant when establishing a WebSocket connection. | 484 // objects. Only relevant when establishing a WebSocket connection. |
485 // This is passed to the underlying network transaction. It is stored here in | 485 // This is passed to the underlying network transaction. It is stored here in |
486 // case the transaction does not exist yet. | 486 // case the transaction does not exist yet. |
487 WebSocketHandshakeStreamBase::CreateHelper* | 487 WebSocketHandshakeStreamBase::CreateHelper* |
488 websocket_handshake_stream_base_create_helper_; | 488 websocket_handshake_stream_base_create_helper_; |
489 | 489 |
490 BeforeNetworkStartCallback before_network_start_callback_; | 490 BeforeNetworkStartCallback before_network_start_callback_; |
491 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; | 491 BeforeProxyHeadersSentCallback before_proxy_headers_sent_callback_; |
492 | 492 |
493 base::WeakPtrFactory<Transaction> weak_factory_; | 493 base::WeakPtrFactory<Transaction> weak_factory_; |
494 | 494 |
495 DISALLOW_COPY_AND_ASSIGN(Transaction); | 495 DISALLOW_COPY_AND_ASSIGN(Transaction); |
496 }; | 496 }; |
497 | 497 |
498 } // namespace net | 498 } // namespace net |
499 | 499 |
500 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 500 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |