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 18 matching lines...) Expand all Loading... |
29 base::TimeDelta::FromSeconds(19200), base::TimeDelta::FromSeconds(38400), | 29 base::TimeDelta::FromSeconds(19200), base::TimeDelta::FromSeconds(38400), |
30 base::TimeDelta::FromSeconds(76800), base::TimeDelta::FromSeconds(153600), | 30 base::TimeDelta::FromSeconds(76800), base::TimeDelta::FromSeconds(153600), |
31 }; | 31 }; |
32 | 32 |
33 class HttpServerPropertiesImplPeer { | 33 class HttpServerPropertiesImplPeer { |
34 public: | 34 public: |
35 static void AddBrokenAlternativeServiceWithExpirationTime( | 35 static void AddBrokenAlternativeServiceWithExpirationTime( |
36 HttpServerPropertiesImpl* impl, | 36 HttpServerPropertiesImpl* impl, |
37 const AlternativeService& alternative_service, | 37 const AlternativeService& alternative_service, |
38 base::TimeTicks when) { | 38 base::TimeTicks when) { |
39 BrokenAlternativeServices::BrokenAlternativeServiceList::iterator unused_it; | 39 BrokenAlternativeServiceList::iterator unused_it; |
40 impl->broken_alternative_services_.AddToBrokenAlternativeServiceListAndMap( | 40 impl->broken_alternative_services_.AddToBrokenAlternativeServiceListAndMap( |
41 alternative_service, when, &unused_it); | 41 alternative_service, when, &unused_it); |
42 auto it = | 42 auto it = |
43 impl->broken_alternative_services_.recently_broken_alternative_services_ | 43 impl->broken_alternative_services_.recently_broken_alternative_services_ |
44 .Get(alternative_service); | 44 .Get(alternative_service); |
45 if (it == impl->broken_alternative_services_ | 45 if (it == impl->broken_alternative_services_ |
46 .recently_broken_alternative_services_.end()) { | 46 .recently_broken_alternative_services_.end()) { |
47 impl->broken_alternative_services_.recently_broken_alternative_services_ | 47 impl->broken_alternative_services_.recently_broken_alternative_services_ |
48 .Put(alternative_service, 1); | 48 .Put(alternative_service, 1); |
49 } else { | 49 } else { |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 EXPECT_EQ(quic_server_info1, *(impl_.GetQuicServerInfo(quic_server_id))); | 1328 EXPECT_EQ(quic_server_info1, *(impl_.GetQuicServerInfo(quic_server_id))); |
1329 | 1329 |
1330 impl_.Clear(); | 1330 impl_.Clear(); |
1331 EXPECT_EQ(0u, impl_.quic_server_info_map().size()); | 1331 EXPECT_EQ(0u, impl_.quic_server_info_map().size()); |
1332 EXPECT_EQ(nullptr, impl_.GetQuicServerInfo(quic_server_id)); | 1332 EXPECT_EQ(nullptr, impl_.GetQuicServerInfo(quic_server_id)); |
1333 } | 1333 } |
1334 | 1334 |
1335 } // namespace | 1335 } // namespace |
1336 | 1336 |
1337 } // namespace net | 1337 } // namespace net |
OLD | NEW |