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

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

Issue 2877243002: Support IPH NotifyEvent calls before Initialize (Closed)
Patch Set: Fixed build.gn Created 3 years, 7 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_FEATURE_ENGAGEMENT_TRACKE R_IMPL_H_ 5 #ifndef COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_FEATURE_ENGAGEMENT_TRACKE R_IMPL_H_
6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_FEATURE_ENGAGEMENT_TRACKE R_IMPL_H_ 6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_FEATURE_ENGAGEMENT_TRACKE R_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/feature_list.h" 11 #include "base/feature_list.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/supports_user_data.h" 14 #include "base/supports_user_data.h"
15 #include "components/feature_engagement_tracker/public/feature_engagement_tracke r.h" 15 #include "components/feature_engagement_tracker/public/feature_engagement_tracke r.h"
16 16
17 namespace feature_engagement_tracker { 17 namespace feature_engagement_tracker {
18 class Configuration; 18 class Configuration;
19 class ConditionValidator; 19 class ConditionValidator;
20 class Model; 20 class Model;
21 class Store;
22 class StorageValidator;
23 class TimeProvider; 21 class TimeProvider;
24 22
25 // The internal implementation of the FeatureEngagementTracker. 23 // The internal implementation of the FeatureEngagementTracker.
26 class FeatureEngagementTrackerImpl : public FeatureEngagementTracker, 24 class FeatureEngagementTrackerImpl : public FeatureEngagementTracker,
27 public base::SupportsUserData { 25 public base::SupportsUserData {
28 public: 26 public:
29 FeatureEngagementTrackerImpl( 27 FeatureEngagementTrackerImpl(
30 std::unique_ptr<Store> store, 28 std::unique_ptr<Model> store,
31 std::unique_ptr<Configuration> configuration, 29 std::unique_ptr<Configuration> configuration,
32 std::unique_ptr<ConditionValidator> condition_validator, 30 std::unique_ptr<ConditionValidator> condition_validator,
33 std::unique_ptr<StorageValidator> storage_validator,
34 std::unique_ptr<TimeProvider> time_provider); 31 std::unique_ptr<TimeProvider> time_provider);
35 ~FeatureEngagementTrackerImpl() override; 32 ~FeatureEngagementTrackerImpl() override;
36 33
37 // FeatureEngagementTracker implementation. 34 // FeatureEngagementTracker implementation.
38 void NotifyEvent(const std::string& event) override; 35 void NotifyEvent(const std::string& event) override;
39 bool ShouldTriggerHelpUI(const base::Feature& feature) override; 36 bool ShouldTriggerHelpUI(const base::Feature& feature) override;
40 void Dismissed(const base::Feature& feature) override; 37 void Dismissed(const base::Feature& feature) override;
41 bool IsInitialized() override; 38 bool IsInitialized() override;
42 void AddOnInitializedCallback(OnInitializedCallback callback) override; 39 void AddOnInitializedCallback(OnInitializedCallback callback) override;
43 40
(...skipping 22 matching lines...) Expand all
66 std::vector<OnInitializedCallback> on_initialized_callbacks_; 63 std::vector<OnInitializedCallback> on_initialized_callbacks_;
67 64
68 base::WeakPtrFactory<FeatureEngagementTrackerImpl> weak_ptr_factory_; 65 base::WeakPtrFactory<FeatureEngagementTrackerImpl> weak_ptr_factory_;
69 66
70 DISALLOW_COPY_AND_ASSIGN(FeatureEngagementTrackerImpl); 67 DISALLOW_COPY_AND_ASSIGN(FeatureEngagementTrackerImpl);
71 }; 68 };
72 69
73 } // namespace feature_engagement_tracker 70 } // namespace feature_engagement_tracker
74 71
75 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_FEATURE_ENGAGEMENT_TRA CKER_IMPL_H_ 72 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_FEATURE_ENGAGEMENT_TRA CKER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698