Add component for feature engagement tracking

Desktop / Chromium - nyquist [chromium.org] - 31 March 2017 16:45 EDT

The Feature Engagement Tracker provides a client-side backend for displaying feature enlightenment or in-product help with a clean and easy to use API to be consumed by the UI frontend. The backend behaves as a black box and takes input about user behavior. Whenever the frontend gives a trigger signal that in-product help could be displayed, the backend will provide an answer to whether it is appropriate to show it or not.

This CL adds a new component for this, with both a public C++ and a public Java API. It also sets up the KeyedService factory in //chrome, and hooks up the bridge between the C++ and Java implementations of the backend. The Java version is a pass through, and all business logic is implemented in C++. This means that callers do not have to care whether they use the Java or C++ version.

It has been implemented as a component to ensure that other components can use it directly, and to ensure that it would be easy to use the same system across different platforms.

BUG=706309

Review-Url: https://codereview.chromium.org/2782113002 Cr-Commit-Position: refs/heads/master@{#461215}

9bf0cdf Add component for feature engagement tracking.
chrome/android/BUILD.gn | 1 +
chrome/android/java/DEPS | 1 +
.../FeatureEngagementTrackerFactory.java | 30 +++++
.../browser/feature_engagement_tracker/OWNERS | 1 +
chrome/android/java_sources.gni | 1 +
chrome/browser/BUILD.gn | 6 +
chrome/browser/android/chrome_jni_registrar.cc | 6 +
.../android/feature_engagement_tracker/OWNERS | 1 +
.../feature_engagement_tracker_factory_android.cc | 29 +++++
.../feature_engagement_tracker_factory_android.h | 13 +++
chrome/browser/feature_engagement_tracker/DEPS | 4 +
chrome/browser/feature_engagement_tracker/OWNERS | 1 +
.../feature_engagement_tracker_factory.cc | 60 ++++++++++
.../feature_engagement_tracker_factory.h | 51 +++++++++
chrome/common/chrome_constants.cc | 2 +
chrome/common/chrome_constants.h | 1 +
components/BUILD.gn | 1 +
components/feature_engagement_tracker/BUILD.gn | 35 ++++++
components/feature_engagement_tracker/DEPS | 5 +
components/feature_engagement_tracker/OWNERS | 2 +
components/feature_engagement_tracker/README.md | 14 +++
.../feature_engagement_tracker/internal/BUILD.gn | 72 ++++++++++++
.../feature_engagement_tracker_impl_android.cc | 121 +++++++++++++++++++++
.../feature_engagement_tracker_impl_android.h | 67 ++++++++++++
.../feature_engagement_tracker_jni_registrar.cc | 29 +++++
.../internal/FeatureEngagementTrackerImpl.java | 81 ++++++++++++++
.../internal/feature_engagement_tracker_impl.cc | 46 ++++++++
.../internal/feature_engagement_tracker_impl.h | 37 +++++++
.../feature_engagement_tracker_impl_unittest.cc | 11 ++
.../feature_engagement_tracker/public/BUILD.gn | 34 ++++++
.../feature_engagement_tracker_jni_registrar.h | 17 +++
.../FeatureEngagementTracker.java | 51 +++++++++
.../public/feature_engagement_tracker.h | 79 ++++++++++++++
33 files changed, 910 insertions(+)

Upstream: git.chromium.org


  • Share