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

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

Issue 9766021: SPDY - Added enabling of SPDY/3 to about:flags. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_stream_factory.h" 5 #include "net/http/http_stream_factory.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 "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 return false; 142 return false;
143 143
144 std::list<HostPortPair>::const_iterator it; 144 std::list<HostPortPair>::const_iterator it;
145 for (it = exclusions->begin(); it != exclusions->end(); ++it) 145 for (it = exclusions->begin(); it != exclusions->end(); ++it)
146 if (it->Equals(endpoint)) 146 if (it->Equals(endpoint))
147 return true; 147 return true;
148 return false; 148 return false;
149 } 149 }
150 150
151 // static 151 // static
152 void HttpStreamFactory::EnableFlowControl() {
153 std::vector<std::string> next_protos;
154 next_protos.push_back("http/1.1");
155 next_protos.push_back("spdy/2");
156 next_protos.push_back("spdy/2.1");
157 SetNextProtos(next_protos);
158 }
159
160 // static
161 void HttpStreamFactory::EnableSPDY3() {
162 std::vector<std::string> next_protos;
163 next_protos.push_back("http/1.1");
164 next_protos.push_back("spdy/2");
165 next_protos.push_back("spdy/2.1");
166 next_protos.push_back("spdy/3");
167 SetNextProtos(next_protos);
168 }
169
170 // static
152 void HttpStreamFactory::SetNextProtos(const std::vector<std::string>& value) { 171 void HttpStreamFactory::SetNextProtos(const std::vector<std::string>& value) {
153 if (!next_protos_) 172 if (!next_protos_)
154 next_protos_ = new std::vector<std::string>; 173 next_protos_ = new std::vector<std::string>;
155 174
156 *next_protos_ = value; 175 *next_protos_ = value;
157 176
158 for (uint32 i = 0; i < NUM_ALTERNATE_PROTOCOLS; ++i) 177 for (uint32 i = 0; i < NUM_ALTERNATE_PROTOCOLS; ++i)
159 enabled_protocols_[i] = false; 178 enabled_protocols_[i] = false;
160 179
161 // TODO(rtenneti): bug 116575 - consider using same strings/enums for SPDY 180 // TODO(rtenneti): bug 116575 - consider using same strings/enums for SPDY
(...skipping 23 matching lines...) Expand all
185 HttpStreamFactory::HttpStreamFactory() {} 204 HttpStreamFactory::HttpStreamFactory() {}
186 205
187 // static 206 // static
188 const HostMappingRules& HttpStreamFactory::host_mapping_rules() { 207 const HostMappingRules& HttpStreamFactory::host_mapping_rules() {
189 if (!host_mapping_rules_) 208 if (!host_mapping_rules_)
190 host_mapping_rules_ = new HostMappingRules; 209 host_mapping_rules_ = new HostMappingRules;
191 return *host_mapping_rules_; 210 return *host_mapping_rules_;
192 } 211 }
193 212
194 } // namespace net 213 } // namespace net
OLDNEW
« net/http/http_network_layer.cc ('K') | « net/http/http_stream_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698