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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 875583003: Do not pool QUIC sessions when privacy mode mismatches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2272
Patch Set: Created 5 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
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 5c0d2f9f741b2c6f7b2778f93977215e2ade09b9..79c5cf34900383181862cb030bb1546038c0aad6 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -706,17 +706,14 @@ bool QuicStreamFactory::OnResolution(
if (disable_connection_pooling_) {
return false;
}
- for (size_t i = 0; i < address_list.size(); ++i) {
- const IPEndPoint& address = address_list[i];
+ for (const IPEndPoint& address : address_list) {
const IpAliasKey ip_alias_key(address, server_id.is_https());
if (!ContainsKey(ip_aliases_, ip_alias_key))
continue;
const SessionSet& sessions = ip_aliases_[ip_alias_key];
- for (SessionSet::const_iterator i = sessions.begin();
- i != sessions.end(); ++i) {
- QuicClientSession* session = *i;
- if (!session->CanPool(server_id.host()))
+ for (QuicClientSession* session : sessions) {
+ if (!session->CanPool(server_id.host(), server_id.privacy_mode()))
continue;
active_sessions_[server_id] = session;
session_aliases_[session].insert(server_id);
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698