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

Side by Side Diff: net/http/http_network_layer.cc

Issue 8892026: SPDY - add support for spdy/2.1 to support flow control. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/http/http_network_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 spdy::SpdyFramer::set_protocol_version(1); 114 spdy::SpdyFramer::set_protocol_version(1);
115 std::vector<std::string> next_protos; 115 std::vector<std::string> next_protos;
116 // This is a temporary hack to pretend we support version 1. 116 // This is a temporary hack to pretend we support version 1.
117 next_protos.push_back("http/1.1"); 117 next_protos.push_back("http/1.1");
118 next_protos.push_back("spdy/1"); 118 next_protos.push_back("spdy/1");
119 HttpStreamFactory::set_next_protos(next_protos); 119 HttpStreamFactory::set_next_protos(next_protos);
120 } else if (option == kDisableAltProtocols) { 120 } else if (option == kDisableAltProtocols) {
121 use_alt_protocols = false; 121 use_alt_protocols = false;
122 HttpStreamFactory::set_use_alternate_protocols(false); 122 HttpStreamFactory::set_use_alternate_protocols(false);
123 } else if (option == kEnableFlowControl) { 123 } else if (option == kEnableFlowControl) {
124 SpdySession::set_flow_control(true); 124 std::vector<std::string> next_protos;
125 next_protos.push_back("http/1.1");
126 next_protos.push_back("spdy/2");
127 next_protos.push_back("spdy/2.1");
128 HttpStreamFactory::set_next_protos(next_protos);
125 } else if (option == kForceAltProtocols) { 129 } else if (option == kForceAltProtocols) {
126 PortAlternateProtocolPair pair; 130 PortAlternateProtocolPair pair;
127 pair.port = 443; 131 pair.port = 443;
128 pair.protocol = NPN_SPDY_2; 132 pair.protocol = NPN_SPDY_2;
129 HttpServerPropertiesImpl::ForceAlternateProtocol(pair); 133 HttpServerPropertiesImpl::ForceAlternateProtocol(pair);
130 } else if (option == kSingleDomain) { 134 } else if (option == kSingleDomain) {
131 SpdySessionPool::ForceSingleDomain(); 135 SpdySessionPool::ForceSingleDomain();
132 LOG(ERROR) << "FORCING SINGLE DOMAIN"; 136 LOG(ERROR) << "FORCING SINGLE DOMAIN";
133 } else if (option == kInitialMaxConcurrentStreams) { 137 } else if (option == kInitialMaxConcurrentStreams) {
134 int streams; 138 int streams;
(...skipping 30 matching lines...) Expand all
165 169
166 if (session_) 170 if (session_)
167 session_->CloseIdleConnections(); 171 session_->CloseIdleConnections();
168 } 172 }
169 173
170 void HttpNetworkLayer::OnResume() { 174 void HttpNetworkLayer::OnResume() {
171 suspended_ = false; 175 suspended_ = false;
172 } 176 }
173 177
174 } // namespace net 178 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698