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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 virtual int64 GetTotalReceivedBytes() const OVERRIDE; | 124 virtual int64 GetTotalReceivedBytes() const OVERRIDE; |
125 virtual void DoneReading() OVERRIDE; | 125 virtual void DoneReading() OVERRIDE; |
126 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 126 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
127 virtual LoadState GetLoadState() const OVERRIDE; | 127 virtual LoadState GetLoadState() const OVERRIDE; |
128 virtual UploadProgress GetUploadProgress(void) const OVERRIDE; | 128 virtual UploadProgress GetUploadProgress(void) const OVERRIDE; |
129 virtual bool GetLoadTimingInfo( | 129 virtual bool GetLoadTimingInfo( |
130 LoadTimingInfo* load_timing_info) const OVERRIDE; | 130 LoadTimingInfo* load_timing_info) const OVERRIDE; |
131 virtual void SetPriority(RequestPriority priority) OVERRIDE; | 131 virtual void SetPriority(RequestPriority priority) OVERRIDE; |
132 virtual void SetWebSocketHandshakeStreamCreateHelper( | 132 virtual void SetWebSocketHandshakeStreamCreateHelper( |
133 net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE; | 133 net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE; |
134 | 134 virtual void SetBeforeNetworkStartCallback( |
135 const base::Callback<void(bool*)>& callback) OVERRIDE; | |
mmenke
2014/01/07 15:26:23
Should make the callback a typedef with a comment
jkarlin
2014/01/07 16:19:32
Done.
| |
136 virtual int ResumeNetworkStart() OVERRIDE; | |
135 private: | 137 private: |
mmenke
2014/01/07 15:26:23
nit: Blank line before private.
jkarlin
2014/01/07 16:19:32
Done.
| |
136 static const size_t kNumValidationHeaders = 2; | 138 static const size_t kNumValidationHeaders = 2; |
137 // Helper struct to pair a header name with its value, for | 139 // Helper struct to pair a header name with its value, for |
138 // headers used to validate cache entries. | 140 // headers used to validate cache entries. |
139 struct ValidationHeaders { | 141 struct ValidationHeaders { |
140 ValidationHeaders() : initialized(false) {} | 142 ValidationHeaders() : initialized(false) {} |
141 | 143 |
142 std::string values[kNumValidationHeaders]; | 144 std::string values[kNumValidationHeaders]; |
143 bool initialized; | 145 bool initialized; |
144 }; | 146 }; |
145 | 147 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 // before the caller requests load timing information. | 433 // before the caller requests load timing information. |
432 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_; | 434 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_; |
433 | 435 |
434 // The helper object to use to create WebSocketHandshakeStreamBase | 436 // The helper object to use to create WebSocketHandshakeStreamBase |
435 // objects. Only relevant when establishing a WebSocket connection. | 437 // objects. Only relevant when establishing a WebSocket connection. |
436 // This is passed to the underlying network transaction. It is stored here in | 438 // This is passed to the underlying network transaction. It is stored here in |
437 // case the transaction does not exist yet. | 439 // case the transaction does not exist yet. |
438 WebSocketHandshakeStreamBase::CreateHelper* | 440 WebSocketHandshakeStreamBase::CreateHelper* |
439 websocket_handshake_stream_base_create_helper_; | 441 websocket_handshake_stream_base_create_helper_; |
440 | 442 |
443 base::Callback<void(bool*)> before_network_start_callback_; | |
444 | |
441 DISALLOW_COPY_AND_ASSIGN(Transaction); | 445 DISALLOW_COPY_AND_ASSIGN(Transaction); |
442 }; | 446 }; |
443 | 447 |
444 } // namespace net | 448 } // namespace net |
445 | 449 |
446 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ | 450 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ |
OLD | NEW |