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

Unified Diff: net/http/http_network_layer.cc

Issue 3195015: Add option to simulate alternate protocol always being present.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/http/http_network_layer.cc
===================================================================
--- net/http/http_network_layer.cc (revision 57015)
+++ net/http/http_network_layer.cc (working copy)
@@ -148,7 +148,9 @@
static const char kDisableCompression[] = "no-compress";
static const char kDisableAltProtocols[] = "no-alt-protocols";
static const char kEnableVersionOne[] = "v1";
+ static const char kForceAltProtocols[] = "force-alt-protocols";
+
// If flow-control is enabled, received WINDOW_UPDATE and SETTINGS
// messages are processed and outstanding window size is actually obeyed
// when sending data frames, and WINDOW_UPDATE messages are generated
@@ -210,6 +212,11 @@
HttpStreamFactory::set_use_alternate_protocols(false);
} else if (option == kEnableFlowControl) {
SpdySession::SetFlowControl(true);
+ } else if (option == kForceAltProtocols) {
+ HttpAlternateProtocols::PortProtocolPair pair;
+ pair.port = 443;
+ pair.protocol = HttpAlternateProtocols::NPN_SPDY_2;
+ HttpAlternateProtocols::ForceAlternateProtocol(pair);
} else if (option.empty() && it == spdy_options.begin()) {
continue;
} else {
« net/http/http_alternate_protocols.cc ('K') | « net/http/http_alternate_protocols_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698