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

Side by Side Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2351373003: Add methods in spdy/quic session to get stream id of pushed stream given the request url (Closed)
Patch Set: nits Created 4 years, 2 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 | « net/quic/chromium/quic_chromium_client_session.h ('k') | net/spdy/spdy_session.h » ('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 #include "net/quic/chromium/quic_chromium_client_session.h" 5 #include "net/quic/chromium/quic_chromium_client_session.h"
6 6
7 #include <openssl/ssl.h> 7 #include <openssl/ssl.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 return ERR_QUIC_HANDSHAKE_FAILED; 659 return ERR_QUIC_HANDSHAKE_FAILED;
660 660
661 callback_ = callback; 661 callback_ = callback;
662 return ERR_IO_PENDING; 662 return ERR_IO_PENDING;
663 } 663 }
664 664
665 int QuicChromiumClientSession::GetNumSentClientHellos() const { 665 int QuicChromiumClientSession::GetNumSentClientHellos() const {
666 return crypto_stream_->num_sent_client_hellos(); 666 return crypto_stream_->num_sent_client_hellos();
667 } 667 }
668 668
669 QuicStreamId QuicChromiumClientSession::GetStreamIdForPush(
670 const GURL& pushed_url) {
671 QuicClientPromisedInfo* promised_info =
672 QuicClientSessionBase::GetPromisedByUrl(pushed_url.spec());
673 if (!promised_info)
674 return 0;
675
676 return promised_info->id();
677 }
678
669 bool QuicChromiumClientSession::CanPool(const std::string& hostname, 679 bool QuicChromiumClientSession::CanPool(const std::string& hostname,
670 PrivacyMode privacy_mode) const { 680 PrivacyMode privacy_mode) const {
671 DCHECK(connection()->connected()); 681 DCHECK(connection()->connected());
672 if (privacy_mode != server_id_.privacy_mode()) { 682 if (privacy_mode != server_id_.privacy_mode()) {
673 // Privacy mode must always match. 683 // Privacy mode must always match.
674 return false; 684 return false;
675 } 685 }
676 SSLInfo ssl_info; 686 SSLInfo ssl_info;
677 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) { 687 if (!GetSSLInfo(&ssl_info) || !ssl_info.cert.get()) {
678 NOTREACHED() << "QUIC should always have certificates."; 688 NOTREACHED() << "QUIC should always have certificates.";
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 } 1410 }
1401 1411
1402 const LoadTimingInfo::ConnectTiming& 1412 const LoadTimingInfo::ConnectTiming&
1403 QuicChromiumClientSession::GetConnectTiming() { 1413 QuicChromiumClientSession::GetConnectTiming() {
1404 connect_timing_.ssl_start = connect_timing_.connect_start; 1414 connect_timing_.ssl_start = connect_timing_.connect_start;
1405 connect_timing_.ssl_end = connect_timing_.connect_end; 1415 connect_timing_.ssl_end = connect_timing_.connect_end;
1406 return connect_timing_; 1416 return connect_timing_;
1407 } 1417 }
1408 1418
1409 } // namespace net 1419 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session.h ('k') | net/spdy/spdy_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698