Chromium Code Reviews| Index: net/http/broken_alternative_services.h |
| diff --git a/net/http/broken_alternative_services.h b/net/http/broken_alternative_services.h |
| index cd1ab903c3f650c93a38ec5489f50923028c8361..9098857dfa06190a1b963050cf6e6b321fbe872d 100644 |
| --- a/net/http/broken_alternative_services.h |
| +++ b/net/http/broken_alternative_services.h |
| @@ -9,13 +9,10 @@ |
| #include <unordered_map> |
| #include "base/memory/weak_ptr.h" |
| +#include "base/time/default_tick_clock.h" |
|
Ryan Hamilton
2017/07/06 16:48:22
It looks like a fwd-declare of base::TickClock sho
wangyix1
2017/07/06 18:04:29
Done.
|
| #include "base/timer/timer.h" |
| #include "net/http/http_server_properties.h" |
| -namespace base { |
| -class TickClock; |
| -} |
| - |
| namespace net { |
| // This class tracks HTTP alternative services that have been marked as broken. |
| @@ -84,6 +81,10 @@ class NET_EXPORT_PRIVATE BrokenAlternativeServices { |
| // expiration time. |
| // All AlternativeServices in |broken_alternative_service_list| must exist in |
| // |recently_broken_alternative_services|. |
| + // |
| + // If a broken/recently-broken alt svc that's being added is already stored, |
| + // the stored expiration/broken-count for that alt svc will be overwritten |
| + // with the new value. |
| void SetBrokenAndRecentlyBrokenAlternativeServices( |
| std::unique_ptr<BrokenAlternativeServiceList> |
| broken_alternative_service_list, |
| @@ -100,12 +101,6 @@ class NET_EXPORT_PRIVATE BrokenAlternativeServices { |
| // friendness is no longer required. |
| friend class HttpServerPropertiesImplPeer; |
| - struct AlternativeServiceHash { |
| - size_t operator()(const net::AlternativeService& entry) const { |
| - return entry.protocol ^ std::hash<std::string>()(entry.host) ^ entry.port; |
| - } |
| - }; |
| - |
| typedef std::unordered_map<AlternativeService, |
| BrokenAlternativeServiceList::iterator, |
| AlternativeServiceHash> |