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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 1540463003: Change the interface of GetAlternativeServicesFor, always return the best Alt-Svc entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change hanging_data_ to vector Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index e48985d2ef323b1bba210ba73b29e604b6ee6b6e..b13e3c63365ef3b2d34e56ab0fc7a9762d33b0b0 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -27,7 +27,6 @@
#include "net/cert/ct_verifier.h"
#include "net/dns/host_resolver.h"
#include "net/dns/single_request_host_resolver.h"
-#include "net/http/http_server_properties.h"
#include "net/quic/crypto/channel_id_chromium.h"
#include "net/quic/crypto/proof_verifier_chromium.h"
#include "net/quic/crypto/properties_based_quic_server_info.h"
@@ -710,6 +709,20 @@ void QuicStreamFactory::set_quic_server_info_factory(
quic_server_info_factory_.reset(quic_server_info_factory);
}
+bool QuicStreamFactory::CanUseExistingSession(QuicServerId server_id,
+ PrivacyMode privacy_mode,
+ StringPiece origin_host) {
+ // TODO(zhongyi): delete active_sessions_.empty() checks once the
+ // android crash issue(crbug.com/498823) is resolved.
+ if (active_sessions_.empty())
+ return false;
+ SessionMap::iterator it = active_sessions_.find(server_id);
+ if (it == active_sessions_.end())
+ return false;
+ QuicChromiumClientSession* session = it->second;
+ return session->CanPool(origin_host.as_string(), privacy_mode);
+}
+
int QuicStreamFactory::Create(const HostPortPair& host_port_pair,
PrivacyMode privacy_mode,
int cert_verify_flags,

Powered by Google App Engine
This is Rietveld 408576698