OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser.feature_engagement_tracker; |
| 6 |
| 7 import org.chromium.chrome.browser.profiles.Profile; |
| 8 import org.chromium.components.feature_engagement_tracker.FeatureEngagementTrack
er; |
| 9 |
| 10 /** |
| 11 * This factory creates FeatureEngagementTracker for the given {@link Profile}. |
| 12 */ |
| 13 public final class FeatureEngagementTrackerFactory { |
| 14 // Don't instantiate me. |
| 15 private FeatureEngagementTrackerFactory() {} |
| 16 |
| 17 /** |
| 18 * A factory method to build a {@link FeatureEngagementTracker} object. Each
Profile only ever |
| 19 * has a single {@link FeatureEngagementTracker}, so the first this method i
s called (or from |
| 20 * native), the {@link FeatureEngagementTracker} will be created, and later
calls will return |
| 21 * the already created instance. |
| 22 * @return The {@link FeatureEngagementTracker} for the given profile object
. |
| 23 */ |
| 24 public static FeatureEngagementTracker getFeatureEngagementTrackerForProfile
(Profile profile) { |
| 25 return nativeGetFeatureEngagementTrackerForProfile(profile); |
| 26 } |
| 27 |
| 28 private static native FeatureEngagementTracker nativeGetFeatureEngagementTra
ckerForProfile( |
| 29 Profile profile); |
| 30 } |
OLD | NEW |