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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/FeatureEngagementTrackerFactory.java

Issue 2782113002: Add component for feature engagement tracking. (Closed)
Patch Set: Fix typo in //chrome/android/java/DEPS Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/FeatureEngagementTrackerFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/FeatureEngagementTrackerFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/FeatureEngagementTrackerFactory.java
new file mode 100644
index 0000000000000000000000000000000000000000..be39e33a214b675aa6b314de77a59fc94f0a8514
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/FeatureEngagementTrackerFactory.java
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.feature_engagement_tracker;
+
+import org.chromium.chrome.browser.profiles.Profile;
+import org.chromium.components.feature_engagement_tracker.FeatureEngagementTracker;
+
+/**
+ * This factory creates FeatureEngagementTracker for the given {@link Profile}.
+ */
+public final class FeatureEngagementTrackerFactory {
+ // Don't instantiate me.
+ private FeatureEngagementTrackerFactory() {}
+
+ /**
+ * A factory method to build a {@link FeatureEngagementTracker} object. Each Profile only ever
+ * has a single {@link FeatureEngagementTracker}, so the first this method is called (or from
+ * native), the {@link FeatureEngagementTracker} will be created, and later calls will return
+ * the already created instance.
+ * @return The {@link FeatureEngagementTracker} for the given profile object.
+ */
+ public static FeatureEngagementTracker getFeatureEngagementTrackerForProfile(Profile profile) {
+ return nativeGetFeatureEngagementTrackerForProfile(profile);
+ }
+
+ private static native FeatureEngagementTracker nativeGetFeatureEngagementTrackerForProfile(
+ Profile profile);
+}
« no previous file with comments | « chrome/android/java/DEPS ('k') | chrome/android/java/src/org/chromium/chrome/browser/feature_engagement_tracker/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698