| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ | 5 #ifndef COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ |
| 6 #define COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ | 6 #define COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <unordered_set> | 13 #include <unordered_set> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/time/time.h" |
| 16 #include "base/values.h" | 17 #include "base/values.h" |
| 17 #include "components/domain_reliability/beacon.h" | 18 #include "components/domain_reliability/beacon.h" |
| 18 #include "components/domain_reliability/config.h" | 19 #include "components/domain_reliability/config.h" |
| 19 #include "components/domain_reliability/context.h" | 20 #include "components/domain_reliability/context.h" |
| 20 #include "components/domain_reliability/domain_reliability_export.h" | 21 #include "components/domain_reliability/domain_reliability_export.h" |
| 21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 22 | 23 |
| 23 namespace domain_reliability { | 24 namespace domain_reliability { |
| 24 | 25 |
| 25 class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContextManager { | 26 class DOMAIN_RELIABILITY_EXPORT DomainReliabilityContextManager { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 66 |
| 66 DomainReliabilityContext::Factory* context_factory_; | 67 DomainReliabilityContext::Factory* context_factory_; |
| 67 // Owns DomainReliabilityContexts. | 68 // Owns DomainReliabilityContexts. |
| 68 ContextMap contexts_; | 69 ContextMap contexts_; |
| 69 // Currently, Domain Reliability only allows header-based configuration by | 70 // Currently, Domain Reliability only allows header-based configuration by |
| 70 // origins that already have baked-in configs. This is the set of origins | 71 // origins that already have baked-in configs. This is the set of origins |
| 71 // that have removed their context (by sending "NEL: max-age=0"), so the | 72 // that have removed their context (by sending "NEL: max-age=0"), so the |
| 72 // context manager knows they are allowed to set a config again later. | 73 // context manager knows they are allowed to set a config again later. |
| 73 std::unordered_set<std::string> removed_contexts_; | 74 std::unordered_set<std::string> removed_contexts_; |
| 74 | 75 |
| 76 base::TimeTicks last_routed_beacon_time_; |
| 77 |
| 75 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContextManager); | 78 DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContextManager); |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 } // namespace domain_reliability | 81 } // namespace domain_reliability |
| 79 | 82 |
| 80 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ | 83 #endif // COMPONENTS_DOMAIN_RELIABILITY_CONTEXT_MANAGER_H_ |
| OLD | NEW |