Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Side by Side Diff: net/http/http_cache_transaction.h

Issue 122453002: Allows deferral of a URLRequest just before talking to the network, at (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Potential fix of a memory leak due to a reference cycle. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_network_transaction.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 virtual void SetBeforeNetworkStartCallback(
135 const BeforeNetworkStartCallback& callback) OVERRIDE;
136 virtual int ResumeNetworkStart() OVERRIDE;
134 137
135 private: 138 private:
136 static const size_t kNumValidationHeaders = 2; 139 static const size_t kNumValidationHeaders = 2;
137 // Helper struct to pair a header name with its value, for 140 // Helper struct to pair a header name with its value, for
138 // headers used to validate cache entries. 141 // headers used to validate cache entries.
139 struct ValidationHeaders { 142 struct ValidationHeaders {
140 ValidationHeaders() : initialized(false) {} 143 ValidationHeaders() : initialized(false) {}
141 144
142 std::string values[kNumValidationHeaders]; 145 std::string values[kNumValidationHeaders];
143 bool initialized; 146 bool initialized;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // before the caller requests load timing information. 434 // before the caller requests load timing information.
432 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_; 435 scoped_ptr<LoadTimingInfo> old_network_trans_load_timing_;
433 436
434 // The helper object to use to create WebSocketHandshakeStreamBase 437 // The helper object to use to create WebSocketHandshakeStreamBase
435 // objects. Only relevant when establishing a WebSocket connection. 438 // objects. Only relevant when establishing a WebSocket connection.
436 // This is passed to the underlying network transaction. It is stored here in 439 // This is passed to the underlying network transaction. It is stored here in
437 // case the transaction does not exist yet. 440 // case the transaction does not exist yet.
438 WebSocketHandshakeStreamBase::CreateHelper* 441 WebSocketHandshakeStreamBase::CreateHelper*
439 websocket_handshake_stream_base_create_helper_; 442 websocket_handshake_stream_base_create_helper_;
440 443
444 base::Callback<void(bool*)> before_network_start_callback_;
mmenke 2014/01/07 19:44:05 base::Callback<void(bool*)> -> BeforeNetworkStartC
jkarlin 2014/01/07 20:10:03 Done. And three other places I missed before.
445
441 DISALLOW_COPY_AND_ASSIGN(Transaction); 446 DISALLOW_COPY_AND_ASSIGN(Transaction);
442 }; 447 };
443 448
444 } // namespace net 449 } // namespace net
445 450
446 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_ 451 #endif // NET_HTTP_HTTP_CACHE_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache_transaction.cc » ('j') | net/http/http_network_transaction.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698