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

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

Issue 17410014: Actually enable Alternate-Protocol support for QUIC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reorder Created 7 years, 6 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
« no previous file with comments | « no previous file | net/http/http_stream_factory.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) 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 static void set_force_spdy_always(bool value) { 225 static void set_force_spdy_always(bool value) {
226 force_spdy_always_ = value; 226 force_spdy_always_ = value;
227 } 227 }
228 static bool force_spdy_always() { return force_spdy_always_; } 228 static bool force_spdy_always() { return force_spdy_always_; }
229 229
230 // Add a URL to exclude from forced SPDY. 230 // Add a URL to exclude from forced SPDY.
231 static void add_forced_spdy_exclusion(const std::string& value); 231 static void add_forced_spdy_exclusion(const std::string& value);
232 // Check if a HostPortPair is excluded from using spdy. 232 // Check if a HostPortPair is excluded from using spdy.
233 static bool HasSpdyExclusion(const HostPortPair& endpoint); 233 static bool HasSpdyExclusion(const HostPortPair& endpoint);
234 234
235 // Sets http/1.1 as the only protocol supported via NPN. 235 // Sets http/1.1 as the only protocol supported via NPN or Alternate-Protocol.
236 static void EnableNpnHttpOnly(); 236 static void EnableNpnHttpOnly();
237 237
238 // Sets http/1.1 and spdy/2 (the default spdy protocol) as the protocols 238 // Sets http/1.1, quic and spdy/2 (the default spdy protocol) as the protocols
239 // supported via NPN. 239 // supported via NPN or Alternate-Protocol.
240 static void EnableNpnSpdy(); 240 static void EnableNpnSpdy();
241 241
242 // Sets http/1.1, spdy/2, and spdy/3 as the protocols supported via NPN. 242 // Sets http/1.1, quic, spdy/2, and spdy/3 as the protocols supported via NPN
243 // or Alternate-Protocol.
243 static void EnableNpnSpdy3(); 244 static void EnableNpnSpdy3();
244 245
245 // Sets http/1.1, spdy/2, spdy/3, and spdy/3.1 as the protocols 246 // Sets http/1.1, quic, spdy/2, spdy/3, and spdy/3.1 as the protocols
246 // supported via NPN. 247 // supported via NPN or Alternate-Protocol.
247 static void EnableNpnSpdy31(); 248 static void EnableNpnSpdy31();
248 249
249 // Sets the protocols supported by NPN (next protocol negotiation) during the 250 // Sets the protocols supported by NPN (next protocol negotiation) during the
250 // SSL handshake as well as by HTTP Alternate-Protocol. 251 // SSL handshake as well as by HTTP Alternate-Protocol.
251 static void SetNextProtos(const std::vector<std::string>& value); 252 static void SetNextProtos(const std::vector<std::string>& value);
252 static bool has_next_protos() { return next_protos_ != NULL; } 253 static bool has_next_protos() { return next_protos_ != NULL; }
253 static const std::vector<std::string>& next_protos() { 254 static const std::vector<std::string>& next_protos() {
254 return *next_protos_; 255 return *next_protos_;
255 } 256 }
256 257
257 protected: 258 protected:
258 HttpStreamFactory(); 259 HttpStreamFactory();
259 260
260 private: 261 private:
261 static std::vector<std::string>* next_protos_; 262 static std::vector<std::string>* next_protos_;
262 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS]; 263 static bool enabled_protocols_[NUM_ALTERNATE_PROTOCOLS];
263 static bool spdy_enabled_; 264 static bool spdy_enabled_;
264 static bool use_alternate_protocols_; 265 static bool use_alternate_protocols_;
265 static bool force_spdy_over_ssl_; 266 static bool force_spdy_over_ssl_;
266 static bool force_spdy_always_; 267 static bool force_spdy_always_;
267 static std::list<HostPortPair>* forced_spdy_exclusions_; 268 static std::list<HostPortPair>* forced_spdy_exclusions_;
268 269
269 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); 270 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory);
270 }; 271 };
271 272
272 } // namespace net 273 } // namespace net
273 274
274 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ 275 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698