| 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 <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 it->second++; | 37 it->second++; |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 static void ExpireBrokenAlternateProtocolMappings( | 41 static void ExpireBrokenAlternateProtocolMappings( |
| 42 HttpServerPropertiesImpl& impl) { | 42 HttpServerPropertiesImpl& impl) { |
| 43 impl.ExpireBrokenAlternateProtocolMappings(); | 43 impl.ExpireBrokenAlternateProtocolMappings(); |
| 44 } | 44 } |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 void PrintTo(const AlternativeService& alternative_service, std::ostream* os) { | |
| 48 *os << alternative_service.ToString(); | |
| 49 } | |
| 50 | |
| 51 namespace { | 47 namespace { |
| 52 | 48 |
| 53 const int kMaxSupportsSpdyServerHosts = 500; | 49 const int kMaxSupportsSpdyServerHosts = 500; |
| 54 | 50 |
| 55 class HttpServerPropertiesImplTest : public testing::Test { | 51 class HttpServerPropertiesImplTest : public testing::Test { |
| 56 protected: | 52 protected: |
| 57 bool HasAlternativeService(const url::SchemeHostPort& origin) { | 53 bool HasAlternativeService(const url::SchemeHostPort& origin) { |
| 58 const AlternativeServiceVector alternative_service_vector = | 54 const AlternativeServiceVector alternative_service_vector = |
| 59 impl_.GetAlternativeServices(origin); | 55 impl_.GetAlternativeServices(origin); |
| 60 return !alternative_service_vector.empty(); | 56 return !alternative_service_vector.empty(); |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 EXPECT_EQ(quic_server_info1, *(impl_.GetQuicServerInfo(quic_server_id))); | 1224 EXPECT_EQ(quic_server_info1, *(impl_.GetQuicServerInfo(quic_server_id))); |
| 1229 | 1225 |
| 1230 impl_.Clear(); | 1226 impl_.Clear(); |
| 1231 EXPECT_EQ(0u, impl_.quic_server_info_map().size()); | 1227 EXPECT_EQ(0u, impl_.quic_server_info_map().size()); |
| 1232 EXPECT_EQ(nullptr, impl_.GetQuicServerInfo(quic_server_id)); | 1228 EXPECT_EQ(nullptr, impl_.GetQuicServerInfo(quic_server_id)); |
| 1233 } | 1229 } |
| 1234 | 1230 |
| 1235 } // namespace | 1231 } // namespace |
| 1236 | 1232 |
| 1237 } // namespace net | 1233 } // namespace net |
| OLD | NEW |