| OLD | NEW |
| 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_server_properties_impl.h" | 5 #include "net/http/http_server_properties_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 break; | 259 break; |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 void HttpServerPropertiesImpl::SetBrokenAlternateProtocol( | 264 void HttpServerPropertiesImpl::SetBrokenAlternateProtocol( |
| 265 const HostPortPair& server) { | 265 const HostPortPair& server) { |
| 266 alternate_protocol_map_[server].protocol = ALTERNATE_PROTOCOL_BROKEN; | 266 alternate_protocol_map_[server].protocol = ALTERNATE_PROTOCOL_BROKEN; |
| 267 } | 267 } |
| 268 | 268 |
| 269 void HttpServerPropertiesImpl::ClearAlternateProtocol( |
| 270 const HostPortPair& server) { |
| 271 alternate_protocol_map_.erase(server); |
| 272 } |
| 273 |
| 269 const AlternateProtocolMap& | 274 const AlternateProtocolMap& |
| 270 HttpServerPropertiesImpl::alternate_protocol_map() const { | 275 HttpServerPropertiesImpl::alternate_protocol_map() const { |
| 271 return alternate_protocol_map_; | 276 return alternate_protocol_map_; |
| 272 } | 277 } |
| 273 | 278 |
| 274 const SettingsMap& HttpServerPropertiesImpl::GetSpdySettings( | 279 const SettingsMap& HttpServerPropertiesImpl::GetSpdySettings( |
| 275 const HostPortPair& host_port_pair) const { | 280 const HostPortPair& host_port_pair) const { |
| 276 SpdySettingsMap::const_iterator it = spdy_settings_map_.find(host_port_pair); | 281 SpdySettingsMap::const_iterator it = spdy_settings_map_.find(host_port_pair); |
| 277 if (it == spdy_settings_map_.end()) { | 282 if (it == spdy_settings_map_.end()) { |
| 278 CR_DEFINE_STATIC_LOCAL(SettingsMap, kEmptySettingsMap, ()); | 283 CR_DEFINE_STATIC_LOCAL(SettingsMap, kEmptySettingsMap, ()); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 if (EndsWith(server.host(), canoncial_suffixes_[i], false)) { | 375 if (EndsWith(server.host(), canoncial_suffixes_[i], false)) { |
| 371 HostPortPair canonical_host(canonical_suffix, server.port()); | 376 HostPortPair canonical_host(canonical_suffix, server.port()); |
| 372 return canonical_host_to_origin_map_.find(canonical_host); | 377 return canonical_host_to_origin_map_.find(canonical_host); |
| 373 } | 378 } |
| 374 } | 379 } |
| 375 | 380 |
| 376 return canonical_host_to_origin_map_.end(); | 381 return canonical_host_to_origin_map_.end(); |
| 377 } | 382 } |
| 378 | 383 |
| 379 } // namespace net | 384 } // namespace net |
| OLD | NEW |