Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: components/domain_reliability/context_manager.h

Issue 2466093002: Domain Reliability: Add more upload-related histograms. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698