| 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/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void HttpServerPropertiesImpl::GetSpdyServerList( | 74 void HttpServerPropertiesImpl::GetSpdyServerList( |
| 75 base::ListValue* spdy_server_list) const { | 75 base::ListValue* spdy_server_list) const { |
| 76 DCHECK(CalledOnValidThread()); | 76 DCHECK(CalledOnValidThread()); |
| 77 DCHECK(spdy_server_list); | 77 DCHECK(spdy_server_list); |
| 78 spdy_server_list->Clear(); | 78 spdy_server_list->Clear(); |
| 79 // Get the list of servers (host/port) that support SPDY. | 79 // Get the list of servers (host/port) that support SPDY. |
| 80 for (SpdyServerHostPortTable::const_iterator it = spdy_servers_table_.begin(); | 80 for (SpdyServerHostPortTable::const_iterator it = spdy_servers_table_.begin(); |
| 81 it != spdy_servers_table_.end(); ++it) { | 81 it != spdy_servers_table_.end(); ++it) { |
| 82 const std::string spdy_server_host_port = it->first; | 82 const std::string spdy_server_host_port = it->first; |
| 83 if (it->second) | 83 if (it->second) |
| 84 spdy_server_list->Append(new StringValue(spdy_server_host_port)); | 84 spdy_server_list->Append(new base::StringValue(spdy_server_host_port)); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 // static | 88 // static |
| 89 std::string HttpServerPropertiesImpl::GetFlattenedSpdyServer( | 89 std::string HttpServerPropertiesImpl::GetFlattenedSpdyServer( |
| 90 const net::HostPortPair& host_port_pair) { | 90 const net::HostPortPair& host_port_pair) { |
| 91 std::string spdy_server; | 91 std::string spdy_server; |
| 92 spdy_server.append(host_port_pair.host()); | 92 spdy_server.append(host_port_pair.host()); |
| 93 spdy_server.append(":"); | 93 spdy_server.append(":"); |
| 94 base::StringAppendF(&spdy_server, "%d", host_port_pair.port()); | 94 base::StringAppendF(&spdy_server, "%d", host_port_pair.port()); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 PipelineCapabilityMap result; | 289 PipelineCapabilityMap result; |
| 290 CachedPipelineCapabilityMap::const_iterator it; | 290 CachedPipelineCapabilityMap::const_iterator it; |
| 291 for (it = pipeline_capability_map_->begin(); | 291 for (it = pipeline_capability_map_->begin(); |
| 292 it != pipeline_capability_map_->end(); ++it) { | 292 it != pipeline_capability_map_->end(); ++it) { |
| 293 result[it->first] = it->second; | 293 result[it->first] = it->second; |
| 294 } | 294 } |
| 295 return result; | 295 return result; |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace net | 298 } // namespace net |
| OLD | NEW |