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

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

Issue 2925093002: Make SpdySessionKey a const member of HttpStreamFactoryImpl::Job (Closed)
Patch Set: Created 3 years, 6 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_stream_factory_impl_job.cc » ('j') | no next file with comments »
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 #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 #include <utility> 9 #include <utility>
10 10
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 int SetSpdyHttpStreamOrBidirectionalStreamImpl( 327 int SetSpdyHttpStreamOrBidirectionalStreamImpl(
328 base::WeakPtr<SpdySession> session, 328 base::WeakPtr<SpdySession> session,
329 bool direct); 329 bool direct);
330 330
331 // Returns to STATE_INIT_CONNECTION and resets some state. 331 // Returns to STATE_INIT_CONNECTION and resets some state.
332 void ReturnToStateInitConnection(bool close_connection); 332 void ReturnToStateInitConnection(bool close_connection);
333 333
334 // Set the motivation for this request onto the underlying socket. 334 // Set the motivation for this request onto the underlying socket.
335 void SetSocketMotivation(); 335 void SetSocketMotivation();
336 336
337 bool IsHttpsProxyAndHttpUrl() const;
338
339 // Is this a SPDY or QUIC alternative Job? 337 // Is this a SPDY or QUIC alternative Job?
340 bool IsSpdyAlternative() const; 338 bool IsSpdyAlternative() const;
341 bool IsQuicAlternative() const; 339 bool IsQuicAlternative() const;
342 340
343 // Sets several fields of |ssl_config| based on the proxy info and other 341 // Sets several fields of |ssl_config| based on the proxy info and other
344 // factors. 342 // factors.
345 void InitSSLConfig(SSLConfig* ssl_config, bool is_proxy) const; 343 void InitSSLConfig(SSLConfig* ssl_config, bool is_proxy) const;
346 344
347 // Retrieve SSLInfo from our SSL Socket. 345 // Retrieve SSLInfo from our SSL Socket.
348 // This must only be called when we are using an SSLSocket. 346 // This must only be called when we are using an SSLSocket.
349 // After calling, the caller can use ssl_info_. 347 // After calling, the caller can use ssl_info_.
350 void GetSSLInfo(); 348 void GetSSLInfo();
351 349
350 // Called in Job constructor. Use |spdy_session_key_| after construction.
352 SpdySessionKey GetSpdySessionKey() const; 351 SpdySessionKey GetSpdySessionKey() const;
Bence 2017/06/07 14:53:33 Nit: please update HttpStreamFactoryImplJobPeer::G
xunjieli 2017/06/07 15:04:18 Done.
353 352
354 // Returns true if the current request can use an existing spdy session. 353 // Returns true if the current request can use an existing spdy session.
355 bool CanUseExistingSpdySession() const; 354 bool CanUseExistingSpdySession() const;
356 355
357 // Called when we encounter a network error that could be resolved by trying 356 // Called when we encounter a network error that could be resolved by trying
358 // a new proxy configuration. If there is another proxy configuration to try 357 // a new proxy configuration. If there is another proxy configuration to try
359 // then this method sets next_state_ appropriately and returns either OK or 358 // then this method sets next_state_ appropriately and returns either OK or
360 // ERR_IO_PENDING depending on whether or not the new proxy configuration is 359 // ERR_IO_PENDING depending on whether or not the new proxy configuration is
361 // available synchronously or asynchronously. Otherwise, the given error 360 // available synchronously or asynchronously. Otherwise, the given error
362 // code is simply returned. 361 // code is simply returned.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 // 0 if we're not preconnecting. Otherwise, the number of streams to 465 // 0 if we're not preconnecting. Otherwise, the number of streams to
467 // preconnect. 466 // preconnect.
468 int num_streams_; 467 int num_streams_;
469 468
470 // Initialized when we create a new SpdySession. 469 // Initialized when we create a new SpdySession.
471 base::WeakPtr<SpdySession> new_spdy_session_; 470 base::WeakPtr<SpdySession> new_spdy_session_;
472 471
473 // Initialized when we have an existing SpdySession. 472 // Initialized when we have an existing SpdySession.
474 base::WeakPtr<SpdySession> existing_spdy_session_; 473 base::WeakPtr<SpdySession> existing_spdy_session_;
475 474
476 // Only used if |new_spdy_session_| is non-NULL. 475 // True if not connecting to an Https proxy for an Http url.
477 bool spdy_session_direct_; 476 const bool spdy_session_direct_;
477
478 const SpdySessionKey spdy_session_key_;
478 479
479 base::TimeTicks job_stream_ready_start_time_; 480 base::TimeTicks job_stream_ready_start_time_;
480 481
481 // Type of stream that is requested. 482 // Type of stream that is requested.
482 HttpStreamRequest::StreamType stream_type_; 483 HttpStreamRequest::StreamType stream_type_;
483 484
484 base::WeakPtrFactory<Job> ptr_factory_; 485 base::WeakPtrFactory<Job> ptr_factory_;
485 486
486 DISALLOW_COPY_AND_ASSIGN(Job); 487 DISALLOW_COPY_AND_ASSIGN(Job);
487 }; 488 };
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 HostPortPair destination, 535 HostPortPair destination,
535 GURL origin_url, 536 GURL origin_url,
536 const ProxyServer& alternative_proxy_server, 537 const ProxyServer& alternative_proxy_server,
537 bool enable_ip_based_pooling, 538 bool enable_ip_based_pooling,
538 NetLog* net_log); 539 NetLog* net_log);
539 }; 540 };
540 541
541 } // namespace net 542 } // namespace net
542 543
543 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 544 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698