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

Side by Side Diff: components/feature_engagement_tracker/internal/single_invalid_configuration.h

Issue 2911123003: Metrics for feature engagement tracker. (Closed)
Patch Set: Created 3 years, 6 months 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGURAT ION_H_ 5 #ifndef COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGURAT ION_H_
6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGURAT ION_H_ 6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGURAT ION_H_
7 7
8 #include <unordered_set> 8 #include <unordered_set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/feature_engagement_tracker/internal/configuration.h" 11 #include "components/feature_engagement_tracker/internal/configuration.h"
12 12
13 namespace base { 13 namespace base {
14 struct Feature; 14 struct Feature;
15 } // namespace base 15 } // namespace base
16 16
17 namespace feature_engagement_tracker { 17 namespace feature_engagement_tracker {
18 18
19 // An Configuration that always returns the same single invalid configuration, 19 // An Configuration that always returns the same single invalid configuration,
20 // regardless of which feature. 20 // regardless of which feature. Also holds an empty ConfigMap.
21 class SingleInvalidConfiguration : public Configuration { 21 class SingleInvalidConfiguration : public Configuration {
22 public: 22 public:
23 SingleInvalidConfiguration(); 23 SingleInvalidConfiguration();
24 ~SingleInvalidConfiguration() override; 24 ~SingleInvalidConfiguration() override;
25 25
26 // Configuration implementation. 26 // Configuration implementation.
27 const FeatureConfig& GetFeatureConfig( 27 const FeatureConfig& GetFeatureConfig(
28 const base::Feature& feature) const override; 28 const base::Feature& feature) const override;
29 const Configuration::ConfigMap& GetRegisteredFeatures() const override;
29 30
30 private: 31 private:
31 // The invalid configuration to always return. 32 // The invalid configuration to always return.
32 FeatureConfig invalid_feature_config_; 33 FeatureConfig invalid_feature_config_;
33 34
35 // An empty map.
36 ConfigMap configs_;
37
34 DISALLOW_COPY_AND_ASSIGN(SingleInvalidConfiguration); 38 DISALLOW_COPY_AND_ASSIGN(SingleInvalidConfiguration);
35 }; 39 };
36 40
37 } // namespace feature_engagement_tracker 41 } // namespace feature_engagement_tracker
38 42
39 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGU RATION_H_ 43 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_SINGLE_INVALID_CONFIGU RATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698