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

Unified Diff: chrome/browser/io_thread.cc

Issue 1808303005: QUIC - extend origin-to-force-quic-on command line option to accept list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 1 Created 4 years, 9 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 | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 1e1979b6175dee05ff47739aff66749f4e76de8e..7e6d28b4938e9e6b953f160b918a6067de26130c 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1145,8 +1145,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
&params->quic_migrate_sessions_on_network_change);
globals.quic_migrate_sessions_early.CopyToIfSet(
&params->quic_migrate_sessions_early);
- globals.origin_to_force_quic_on.CopyToIfSet(
- &params->origin_to_force_quic_on);
+ if (!globals.origins_to_force_quic_on.empty())
+ params->origins_to_force_quic_on = globals.origins_to_force_quic_on;
params->enable_user_alternate_protocol_ports =
globals.enable_user_alternate_protocol_ports;
params->enable_token_binding = globals.enable_token_binding;
@@ -1324,11 +1324,13 @@ void IOThread::ConfigureQuicGlobals(
}
if (command_line.HasSwitch(switches::kOriginToForceQuicOn)) {
- net::HostPortPair quic_origin =
- net::HostPortPair::FromString(
- command_line.GetSwitchValueASCII(switches::kOriginToForceQuicOn));
- if (!quic_origin.IsEmpty()) {
- globals->origin_to_force_quic_on.set(quic_origin);
+ std::string origins =
+ command_line.GetSwitchValueASCII(switches::kOriginToForceQuicOn);
+ for (const std::string& host_port : base::SplitString(
+ origins, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ net::HostPortPair quic_origin = net::HostPortPair::FromString(host_port);
+ if (!quic_origin.IsEmpty())
+ globals->origins_to_force_quic_on.insert(quic_origin);
}
}
}
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698