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

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

Issue 2351513002: net: rename BoundNetLog to NetLogWithSource (Closed)
Patch Set: one more fix, content bound_net_log_ Created 4 years, 3 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
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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Called when |job| determines the appropriate |spdy_session_key| for the 137 // Called when |job| determines the appropriate |spdy_session_key| for the
138 // Request. Note that this does not mean that SPDY is necessarily supported 138 // Request. Note that this does not mean that SPDY is necessarily supported
139 // for this SpdySessionKey, since we may need to wait for NPN to complete 139 // for this SpdySessionKey, since we may need to wait for NPN to complete
140 // before knowing if SPDY is available. 140 // before knowing if SPDY is available.
141 virtual void SetSpdySessionKey(Job* job, 141 virtual void SetSpdySessionKey(Job* job,
142 const SpdySessionKey& spdy_session_key) = 0; 142 const SpdySessionKey& spdy_session_key) = 0;
143 143
144 // Remove session from the SpdySessionRequestMap. 144 // Remove session from the SpdySessionRequestMap.
145 virtual void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) = 0; 145 virtual void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) = 0;
146 146
147 virtual const BoundNetLog* GetNetLog(Job* job) const = 0; 147 virtual const NetLogWithSource* GetNetLog(Job* job) const = 0;
148 148
149 virtual WebSocketHandshakeStreamBase::CreateHelper* 149 virtual WebSocketHandshakeStreamBase::CreateHelper*
150 websocket_handshake_stream_create_helper() = 0; 150 websocket_handshake_stream_create_helper() = 0;
151 151
152 virtual void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) = 0; 152 virtual void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) = 0;
153 153
154 virtual bool for_websockets() = 0; 154 virtual bool for_websockets() = 0;
155 }; 155 };
156 156
157 // Constructor for non-alternative Job. 157 // Constructor for non-alternative Job.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // Called to detach |this| Job. May resume the other Job, will disconnect 208 // Called to detach |this| Job. May resume the other Job, will disconnect
209 // the socket for |this| Job, and notify |delegate| upon completion. 209 // the socket for |this| Job, and notify |delegate| upon completion.
210 void Orphan(); 210 void Orphan();
211 211
212 void SetPriority(RequestPriority priority); 212 void SetPriority(RequestPriority priority);
213 213
214 RequestPriority priority() const { return priority_; } 214 RequestPriority priority() const { return priority_; }
215 bool was_alpn_negotiated() const; 215 bool was_alpn_negotiated() const;
216 NextProto negotiated_protocol() const; 216 NextProto negotiated_protocol() const;
217 bool using_spdy() const; 217 bool using_spdy() const;
218 const BoundNetLog& net_log() const { return net_log_; } 218 const NetLogWithSource& net_log() const { return net_log_; }
219 HttpStreamRequest::StreamType stream_type() const { return stream_type_; } 219 HttpStreamRequest::StreamType stream_type() const { return stream_type_; }
220 220
221 std::unique_ptr<HttpStream> ReleaseStream() { return std::move(stream_); } 221 std::unique_ptr<HttpStream> ReleaseStream() { return std::move(stream_); }
222 222
223 void SetStream(HttpStream* http_stream) { stream_.reset(http_stream); } 223 void SetStream(HttpStream* http_stream) { stream_.reset(http_stream); }
224 224
225 std::unique_ptr<BidirectionalStreamImpl> ReleaseBidirectionalStream() { 225 std::unique_ptr<BidirectionalStreamImpl> ReleaseBidirectionalStream() {
226 return std::move(bidirectional_stream_impl_); 226 return std::move(bidirectional_stream_impl_);
227 } 227 }
228 228
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle); 390 static void LogHttpConnectedMetrics(const ClientSocketHandle& handle);
391 391
392 // Invoked by the transport socket pool after host resolution is complete 392 // Invoked by the transport socket pool after host resolution is complete
393 // to allow the connection to be aborted, if a matching SPDY session can 393 // to allow the connection to be aborted, if a matching SPDY session can
394 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a 394 // be found. Will return ERR_SPDY_SESSION_ALREADY_EXISTS if such a
395 // session is found, and OK otherwise. 395 // session is found, and OK otherwise.
396 static int OnHostResolution(SpdySessionPool* spdy_session_pool, 396 static int OnHostResolution(SpdySessionPool* spdy_session_pool,
397 const SpdySessionKey& spdy_session_key, 397 const SpdySessionKey& spdy_session_key,
398 const GURL& origin_url, 398 const GURL& origin_url,
399 const AddressList& addresses, 399 const AddressList& addresses,
400 const BoundNetLog& net_log); 400 const NetLogWithSource& net_log);
401 401
402 const HttpRequestInfo request_info_; 402 const HttpRequestInfo request_info_;
403 RequestPriority priority_; 403 RequestPriority priority_;
404 ProxyInfo proxy_info_; 404 ProxyInfo proxy_info_;
405 SSLConfig server_ssl_config_; 405 SSLConfig server_ssl_config_;
406 SSLConfig proxy_ssl_config_; 406 SSLConfig proxy_ssl_config_;
407 const BoundNetLog net_log_; 407 const NetLogWithSource net_log_;
408 408
409 CompletionCallback io_callback_; 409 CompletionCallback io_callback_;
410 std::unique_ptr<ClientSocketHandle> connection_; 410 std::unique_ptr<ClientSocketHandle> connection_;
411 HttpNetworkSession* const session_; 411 HttpNetworkSession* const session_;
412 State next_state_; 412 State next_state_;
413 ProxyService::PacRequest* pac_request_; 413 ProxyService::PacRequest* pac_request_;
414 SSLInfo ssl_info_; 414 SSLInfo ssl_info_;
415 415
416 // The server we are trying to reach, could be that of the origin or of the 416 // The server we are trying to reach, could be that of the origin or of the
417 // alternative service (after applying host mapping rules). 417 // alternative service (after applying host mapping rules).
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 const SSLConfig& server_ssl_config, 533 const SSLConfig& server_ssl_config,
534 const SSLConfig& proxy_ssl_config, 534 const SSLConfig& proxy_ssl_config,
535 HostPortPair destination, 535 HostPortPair destination,
536 GURL origin_url, 536 GURL origin_url,
537 NetLog* net_log) = 0; 537 NetLog* net_log) = 0;
538 }; 538 };
539 539
540 } // namespace net 540 } // namespace net
541 541
542 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 542 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698