OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_alternate_protocols.h" | 5 #include "net/http/http_alternate_protocols.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 const char HttpAlternateProtocols::kHeader[] = "Alternate-Protocol"; | 13 const char HttpAlternateProtocols::kHeader[] = "Alternate-Protocol"; |
14 const char* const HttpAlternateProtocols::kProtocolStrings[] = { | 14 const char* const HttpAlternateProtocols::kProtocolStrings[] = { |
15 "npn-spdy/1", | 15 "npn-spdy/1", |
16 "npn-spdy/2", | 16 "npn-spdy/2", |
17 }; | 17 }; |
18 | 18 |
19 const char* HttpAlternateProtocols::ProtocolToString( | 19 const char* HttpAlternateProtocols::ProtocolToString( |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 forced_alternate_protocol_ = new PortProtocolPair(pair); | 128 forced_alternate_protocol_ = new PortProtocolPair(pair); |
129 } | 129 } |
130 | 130 |
131 // static | 131 // static |
132 void HttpAlternateProtocols::DisableForcedAlternateProtocol() { | 132 void HttpAlternateProtocols::DisableForcedAlternateProtocol() { |
133 delete forced_alternate_protocol_; | 133 delete forced_alternate_protocol_; |
134 forced_alternate_protocol_ = NULL; | 134 forced_alternate_protocol_ = NULL; |
135 } | 135 } |
136 | 136 |
137 } // namespace net | 137 } // namespace net |
OLD | NEW |