Commit 4758bf05 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Video Tutorials : Added summary IPH

This CL adds :
1 - Summary card IPH, that is shown after all other tutorial IPHs have
been tapped by the user. Summary card is treated as a synthetic tutorial
available only on NTP. It isn't addded to the actual list of tutorials
which shows up elsewhere, e.g. tutorial list page. Tapping on summary
card opens up the tutorial list page.
2 - Added remaining IPHs : chrome intro IPH, voice search IPH and their
corresponding tutorials/proto at the backend.
3 - Renamed IPH features to be NTP specific since we will have the same
tutorial shown on other surfaces as well. The click/dismiss events
are kept generic so that they can be shared across NTP and non-NTP IPHs.

Bug: 1117186, 1130255
Change-Id: I101b3a69cfa41bfcdbc45264c9f800fa3a0d2f26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438778
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815224}
parent 687efc51
...@@ -5,15 +5,19 @@ ...@@ -5,15 +5,19 @@
package org.chromium.chrome.browser.app.video_tutorials; package org.chromium.chrome.browser.app.video_tutorials;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.view.ViewStub; import android.view.ViewStub;
import org.chromium.base.Callback; import org.chromium.base.Callback;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feature_engagement.TrackerFactory; import org.chromium.chrome.browser.feature_engagement.TrackerFactory;
import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.image_fetcher.ImageFetcher; import org.chromium.chrome.browser.image_fetcher.ImageFetcher;
import org.chromium.chrome.browser.image_fetcher.ImageFetcherConfig; import org.chromium.chrome.browser.image_fetcher.ImageFetcherConfig;
import org.chromium.chrome.browser.image_fetcher.ImageFetcherFactory; import org.chromium.chrome.browser.image_fetcher.ImageFetcherFactory;
import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.video_tutorials.FeatureType;
import org.chromium.chrome.browser.video_tutorials.Tutorial; import org.chromium.chrome.browser.video_tutorials.Tutorial;
import org.chromium.chrome.browser.video_tutorials.VideoTutorialService; import org.chromium.chrome.browser.video_tutorials.VideoTutorialService;
import org.chromium.chrome.browser.video_tutorials.VideoTutorialServiceFactory; import org.chromium.chrome.browser.video_tutorials.VideoTutorialServiceFactory;
...@@ -22,6 +26,7 @@ import org.chromium.chrome.browser.video_tutorials.iph.VideoTutorialIPHUtils; ...@@ -22,6 +26,7 @@ import org.chromium.chrome.browser.video_tutorials.iph.VideoTutorialIPHUtils;
import org.chromium.components.browser_ui.util.GlobalDiscardableReferencePool; import org.chromium.components.browser_ui.util.GlobalDiscardableReferencePool;
import org.chromium.components.feature_engagement.Tracker; import org.chromium.components.feature_engagement.Tracker;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -31,6 +36,13 @@ import java.util.List; ...@@ -31,6 +36,13 @@ import java.util.List;
* dismissed. * dismissed.
*/ */
public class NewTabPageVideoIPHManager { public class NewTabPageVideoIPHManager {
/**
* Delay between user tapping a card and card being dismissed, so that the card doesn't dismiss
* before the video player activity launches.
*/
private static final int CARD_HIDE_ANIMATION_DURATION_MS = 500;
private final Handler mHandler = new Handler();
private Context mContext; private Context mContext;
private Tracker mTracker; private Tracker mTracker;
private VideoIPHCoordinator mVideoIPHCoordinator; private VideoIPHCoordinator mVideoIPHCoordinator;
...@@ -59,16 +71,20 @@ public class NewTabPageVideoIPHManager { ...@@ -59,16 +71,20 @@ public class NewTabPageVideoIPHManager {
} }
private void onFetchTutorials(List<Tutorial> tutorials) { private void onFetchTutorials(List<Tutorial> tutorials) {
// Make a copy of the list before adding summary card.
List<Tutorial> tutorialsCopy = new ArrayList<>(tutorials);
addSyntheticSummaryTutorial(tutorialsCopy);
mTracker.addOnInitializedCallback(success -> { mTracker.addOnInitializedCallback(success -> {
if (!success) return; if (!success) return;
showFirstEligibleIPH(tutorials); showFirstEligibleIPH(tutorialsCopy);
}); });
} }
private void showFirstEligibleIPH(List<Tutorial> tutorials) { private void showFirstEligibleIPH(List<Tutorial> tutorials) {
for (Tutorial tutorial : tutorials) { for (Tutorial tutorial : tutorials) {
String featureName = VideoTutorialIPHUtils.getFeatureName(tutorial.featureType); String featureName = VideoTutorialIPHUtils.getFeatureNameForNTP(tutorial.featureType);
if (featureName == null) continue;
if (mTracker.shouldTriggerHelpUI(featureName)) { if (mTracker.shouldTriggerHelpUI(featureName)) {
mVideoIPHCoordinator.showVideoIPH(tutorial); mVideoIPHCoordinator.showVideoIPH(tutorial);
mTracker.dismissed(featureName); mTracker.dismissed(featureName);
...@@ -82,7 +98,13 @@ public class NewTabPageVideoIPHManager { ...@@ -82,7 +98,13 @@ public class NewTabPageVideoIPHManager {
mTracker.notifyEvent(VideoTutorialIPHUtils.getClickEvent(tutorial.featureType)); mTracker.notifyEvent(VideoTutorialIPHUtils.getClickEvent(tutorial.featureType));
// Bring up the player and start playing the video. // Bring up the player and start playing the video.
VideoPlayerActivity.playVideoTutorial(mContext, tutorial); if (tutorial.featureType == FeatureType.SUMMARY) {
launchTutorialListActivity();
} else {
VideoPlayerActivity.playVideoTutorial(mContext, tutorial);
}
mHandler.postDelayed(mVideoIPHCoordinator::hideVideoIPH, CARD_HIDE_ANIMATION_DURATION_MS);
} }
private void onDismissIPH(Tutorial tutorial) { private void onDismissIPH(Tutorial tutorial) {
...@@ -91,4 +113,17 @@ public class NewTabPageVideoIPHManager { ...@@ -91,4 +113,17 @@ public class NewTabPageVideoIPHManager {
// TODO(shaktisahu): Animate this. Maybe add a delay. // TODO(shaktisahu): Animate this. Maybe add a delay.
mVideoTutorialService.getTutorials(this::onFetchTutorials); mVideoTutorialService.getTutorials(this::onFetchTutorials);
} }
private void addSyntheticSummaryTutorial(List<Tutorial> tutorials) {
Tutorial summary = new Tutorial(FeatureType.INVALID,
mContext.getString(R.string.video_tutorials_card_all_videos), null, null, null,
null, 0);
tutorials.add(summary);
}
private void launchTutorialListActivity() {
Intent intent = new Intent();
intent.setClass(mContext, VideoTutorialListActivity.class);
mContext.startActivity(intent);
}
} }
...@@ -19,4 +19,9 @@ public interface VideoIPHCoordinator { ...@@ -19,4 +19,9 @@ public interface VideoIPHCoordinator {
* @param tutorial The tutorial to be featured in the IPH. * @param tutorial The tutorial to be featured in the IPH.
*/ */
void showVideoIPH(Tutorial tutorial); void showVideoIPH(Tutorial tutorial);
/**
* Hides the IPH card. Should be called after it has been clicked.
*/
void hideVideoIPH();
} }
\ No newline at end of file
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
package org.chromium.chrome.browser.video_tutorials.iph; package org.chromium.chrome.browser.video_tutorials.iph;
import androidx.annotation.Nullable;
import org.chromium.chrome.browser.video_tutorials.FeatureType; import org.chromium.chrome.browser.video_tutorials.FeatureType;
import org.chromium.components.feature_engagement.EventConstants; import org.chromium.components.feature_engagement.EventConstants;
import org.chromium.components.feature_engagement.FeatureConstants; import org.chromium.components.feature_engagement.FeatureConstants;
...@@ -12,29 +14,45 @@ import org.chromium.components.feature_engagement.FeatureConstants; ...@@ -12,29 +14,45 @@ import org.chromium.components.feature_engagement.FeatureConstants;
* Handles various feature utility functions associated with video tutorials IPH. * Handles various feature utility functions associated with video tutorials IPH.
*/ */
public class VideoTutorialIPHUtils { public class VideoTutorialIPHUtils {
/** @return The feature name to be used in IPH backend for the given {@code featureType}. */ /**
public static String getFeatureName(@FeatureType int featureType) { * @return The feature name to be used in IPH backend for the given {@code featureType} in order
* to show the feature IPH on NTP.
*/
public static @Nullable String getFeatureNameForNTP(@FeatureType int featureType) {
switch (featureType) { switch (featureType) {
case FeatureType.SUMMARY:
return FeatureConstants.VIDEO_TUTORIAL_NTP_SUMMARY_FEATURE;
case FeatureType.CHROME_INTRO:
return FeatureConstants.VIDEO_TUTORIAL_NTP_CHROME_INTRO_FEATURE;
case FeatureType.DOWNLOAD: case FeatureType.DOWNLOAD:
return FeatureConstants.VIDEO_TUTORIAL_DOWNLOAD_FEATURE; return FeatureConstants.VIDEO_TUTORIAL_NTP_DOWNLOAD_FEATURE;
case FeatureType.SEARCH: case FeatureType.SEARCH:
return FeatureConstants.VIDEO_TUTORIAL_SEARCH_FEATURE; return FeatureConstants.VIDEO_TUTORIAL_NTP_SEARCH_FEATURE;
case FeatureType.VOICE_SEARCH:
return FeatureConstants.VIDEO_TUTORIAL_NTP_VOICE_SEARCH_FEATURE;
default: default:
assert false; // It's possible that there are more feature types known to server than the client.
// Don't show an IPH for those tutorials.
return null; return null;
} }
} }
/** /**
* @return The event used in IPH backend when the IPH associated with the {@code featureType} * @return The event used in IPH backend when the IPH associated with the {@code featureType}
* is clicked. * on NTP is clicked.
*/ */
public static String getClickEvent(@FeatureType int featureType) { public static String getClickEvent(@FeatureType int featureType) {
switch (featureType) { switch (featureType) {
case FeatureType.SUMMARY:
return EventConstants.VIDEO_TUTORIAL_CLICKED_SUMMARY;
case FeatureType.CHROME_INTRO:
return EventConstants.VIDEO_TUTORIAL_CLICKED_CHROME_INTRO;
case FeatureType.DOWNLOAD: case FeatureType.DOWNLOAD:
return EventConstants.VIDEO_TUTORIAL_CLICKED_DOWNLOAD; return EventConstants.VIDEO_TUTORIAL_CLICKED_DOWNLOAD;
case FeatureType.SEARCH: case FeatureType.SEARCH:
return EventConstants.VIDEO_TUTORIAL_CLICKED_SEARCH; return EventConstants.VIDEO_TUTORIAL_CLICKED_SEARCH;
case FeatureType.VOICE_SEARCH:
return EventConstants.VIDEO_TUTORIAL_CLICKED_VOICE_SEARCH;
default: default:
assert false; assert false;
return null; return null;
...@@ -43,14 +61,20 @@ public class VideoTutorialIPHUtils { ...@@ -43,14 +61,20 @@ public class VideoTutorialIPHUtils {
/** /**
* @return The event used in IPH backend when the IPH associated with the {@code featureType} * @return The event used in IPH backend when the IPH associated with the {@code featureType}
* is dismissed. * on NTP is dismissed.
*/ */
public static String getDismissEvent(@FeatureType int featureType) { public static String getDismissEvent(@FeatureType int featureType) {
switch (featureType) { switch (featureType) {
case FeatureType.SUMMARY:
return EventConstants.VIDEO_TUTORIAL_DISMISSED_SUMMARY;
case FeatureType.CHROME_INTRO:
return EventConstants.VIDEO_TUTORIAL_DISMISSED_CHROME_INTRO;
case FeatureType.DOWNLOAD: case FeatureType.DOWNLOAD:
return EventConstants.VIDEO_TUTORIAL_DISMISSED_DOWNLOAD; return EventConstants.VIDEO_TUTORIAL_DISMISSED_DOWNLOAD;
case FeatureType.SEARCH: case FeatureType.SEARCH:
return EventConstants.VIDEO_TUTORIAL_DISMISSED_SEARCH; return EventConstants.VIDEO_TUTORIAL_DISMISSED_SEARCH;
case FeatureType.VOICE_SEARCH:
return EventConstants.VIDEO_TUTORIAL_DISMISSED_VOICE_SEARCH;
default: default:
assert false; assert false;
return null; return null;
......
...@@ -69,4 +69,9 @@ public class VideoIPHCoordinatorImpl implements VideoIPHCoordinator { ...@@ -69,4 +69,9 @@ public class VideoIPHCoordinatorImpl implements VideoIPHCoordinator {
}; };
}); });
} }
@Override
public void hideVideoIPH() {
mModel.set(VideoIPHProperties.VISIBILITY, false);
}
} }
\ No newline at end of file
...@@ -13,12 +13,16 @@ FeatureType ToFeatureType(proto::FeatureType type) { ...@@ -13,12 +13,16 @@ FeatureType ToFeatureType(proto::FeatureType type) {
switch (type) { switch (type) {
case proto::FeatureType::INVALID: case proto::FeatureType::INVALID:
return FeatureType::kInvalid; return FeatureType::kInvalid;
case proto::FeatureType::DEBUG: case proto::FeatureType::SUMMARY:
return FeatureType::kDebug; return FeatureType::kSummary;
case proto::FeatureType::CHROME_INTRO:
return FeatureType::kChromeIntro;
case proto::FeatureType::DOWNLOAD: case proto::FeatureType::DOWNLOAD:
return FeatureType::kDownload; return FeatureType::kDownload;
case proto::FeatureType::SEARCH: case proto::FeatureType::SEARCH:
return FeatureType::kSearch; return FeatureType::kSearch;
case proto::FeatureType::VOICE_SEARCH:
return FeatureType::kVoiceSearch;
case proto::FeatureType::TEST: case proto::FeatureType::TEST:
return FeatureType::kTest; return FeatureType::kTest;
default: default:
...@@ -31,12 +35,16 @@ proto::FeatureType FromFeatureType(FeatureType type) { ...@@ -31,12 +35,16 @@ proto::FeatureType FromFeatureType(FeatureType type) {
switch (type) { switch (type) {
case FeatureType::kInvalid: case FeatureType::kInvalid:
return proto::FeatureType::INVALID; return proto::FeatureType::INVALID;
case FeatureType::kDebug: case FeatureType::kSummary:
return proto::FeatureType::DEBUG; return proto::FeatureType::SUMMARY;
case FeatureType::kChromeIntro:
return proto::FeatureType::CHROME_INTRO;
case FeatureType::kDownload: case FeatureType::kDownload:
return proto::FeatureType::DOWNLOAD; return proto::FeatureType::DOWNLOAD;
case FeatureType::kSearch: case FeatureType::kSearch:
return proto::FeatureType::SEARCH; return proto::FeatureType::SEARCH;
case FeatureType::kVoiceSearch:
return proto::FeatureType::VOICE_SEARCH;
case FeatureType::kTest: case FeatureType::kTest:
return proto::FeatureType::TEST; return proto::FeatureType::TEST;
default: default:
......
...@@ -13,9 +13,10 @@ namespace { ...@@ -13,9 +13,10 @@ namespace {
TEST(VideoTutorialsProtoConversionsTest, FeatureConversion) { TEST(VideoTutorialsProtoConversionsTest, FeatureConversion) {
Tutorial expected, actual; Tutorial expected, actual;
TutorialProto intermediate; TutorialProto intermediate;
FeatureType features[] = {FeatureType::kTest, FeatureType::kInvalid, FeatureType features[] = {FeatureType::kTest, FeatureType::kInvalid,
FeatureType::kDebug, FeatureType::kDownload, FeatureType::kSummary, FeatureType::kChromeIntro,
FeatureType::kSearch}; FeatureType::kDownload, FeatureType::kSearch,
FeatureType::kVoiceSearch};
for (FeatureType feature : features) { for (FeatureType feature : features) {
expected.feature = feature; expected.feature = feature;
TutorialToProto(&expected, &intermediate); TutorialToProto(&expected, &intermediate);
......
...@@ -11,9 +11,11 @@ package video_tutorials.proto; ...@@ -11,9 +11,11 @@ package video_tutorials.proto;
// Represents the feature where the video tutorial targeted to. // Represents the feature where the video tutorial targeted to.
enum FeatureType { enum FeatureType {
INVALID = 0; INVALID = 0;
DEBUG = 1; SUMMARY = 1;
DOWNLOAD = 2; CHROME_INTRO = 2;
SEARCH = 3; DOWNLOAD = 3;
SEARCH = 4;
VOICE_SEARCH = 5;
// For test only. // For test only.
TEST = 9999999; TEST = 9999999;
} }
......
...@@ -11,16 +11,20 @@ ...@@ -11,16 +11,20 @@
namespace video_tutorials { namespace video_tutorials {
// Please align this enum with // Please align this enum with
// chrome/browser/video_tutorials/proto/video_tutorials.proto. // chrome/browser/video_tutorials/proto/video_tutorials.proto and variants
// Feature in
// tools/metrics/histograms/histograms_xml/video_tutorials/histograms.xml.
// A Java counterpart will be generated for this enum. // A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.video_tutorials // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.video_tutorials
enum class FeatureType { enum class FeatureType {
kTest = -1, kTest = -1,
kInvalid = 0, kInvalid = 0,
kDebug = 1, kSummary = 1,
kDownload = 2, kChromeIntro = 2,
kSearch = 3, kDownload = 3,
kMaxValue = kSearch, kSearch = 4,
kVoiceSearch = 5,
kMaxValue = kVoiceSearch,
}; };
// In memory struct representing a language. // In memory struct representing a language.
......
...@@ -179,13 +179,25 @@ public final class EventConstants { ...@@ -179,13 +179,25 @@ public final class EventConstants {
public static final String NTP_HOME_BUTTON_CLICKED = "ntp_homebutton_clicked"; public static final String NTP_HOME_BUTTON_CLICKED = "ntp_homebutton_clicked";
/** Video tutorial related events. */ /** Video tutorial related events. */
public static final String VIDEO_TUTORIAL_DISMISSED_SUMMARY =
"video_tutorial_iph_dismissed_summary";
public static final String VIDEO_TUTORIAL_DISMISSED_CHROME_INTRO =
"video_tutorial_iph_dismissed_chrome_intro";
public static final String VIDEO_TUTORIAL_DISMISSED_DOWNLOAD = public static final String VIDEO_TUTORIAL_DISMISSED_DOWNLOAD =
"video_tutorial_iph_dismissed_download"; "video_tutorial_iph_dismissed_download";
public static final String VIDEO_TUTORIAL_DISMISSED_SEARCH = public static final String VIDEO_TUTORIAL_DISMISSED_SEARCH =
"video_tutorial_iph_dismissed_search"; "video_tutorial_iph_dismissed_search";
public static final String VIDEO_TUTORIAL_DISMISSED_VOICE_SEARCH =
"video_tutorial_iph_dismissed_voice_search";
public static final String VIDEO_TUTORIAL_CLICKED_SUMMARY =
"video_tutorial_iph_clicked_summary";
public static final String VIDEO_TUTORIAL_CLICKED_CHROME_INTRO =
"video_tutorial_iph_clicked_chrome_intro";
public static final String VIDEO_TUTORIAL_CLICKED_DOWNLOAD = public static final String VIDEO_TUTORIAL_CLICKED_DOWNLOAD =
"video_tutorial_iph_clicked_download"; "video_tutorial_iph_clicked_download";
public static final String VIDEO_TUTORIAL_CLICKED_SEARCH = "video_tutorial_iph_clicked_search"; public static final String VIDEO_TUTORIAL_CLICKED_SEARCH = "video_tutorial_iph_clicked_search";
public static final String VIDEO_TUTORIAL_CLICKED_VOICE_SEARCH =
"video_tutorial_iph_clicked_voice_search";
/** Reengagement events. */ /** Reengagement events. */
public static final String STARTED_FROM_MAIN_INTENT = "started_from_main_intent"; public static final String STARTED_FROM_MAIN_INTENT = "started_from_main_intent";
......
...@@ -134,14 +134,32 @@ public @interface FeatureConstants { ...@@ -134,14 +134,32 @@ public @interface FeatureConstants {
String TAB_GROUPS_DRAG_AND_DROP_FEATURE = "IPH_TabGroupsDragAndDrop"; String TAB_GROUPS_DRAG_AND_DROP_FEATURE = "IPH_TabGroupsDragAndDrop";
/** /**
* An IPH feature to show a video tutorial card to educate about downloading in chrome. * An IPH feature to show a video tutorial card on NTP to educate about an introduction to
* chrome.
*/ */
String VIDEO_TUTORIAL_DOWNLOAD_FEATURE = "IPH_VideoTutorial_Download"; String VIDEO_TUTORIAL_NTP_CHROME_INTRO_FEATURE = "IPH_VideoTutorial_NTP_ChromeIntro";
/** /**
* An IPH feature to show a video tutorial card to educate about how to search in chrome. * An IPH feature to show a video tutorial card on NTP to educate about downloading in chrome.
*/ */
String VIDEO_TUTORIAL_SEARCH_FEATURE = "IPH_VideoTutorial_Search"; String VIDEO_TUTORIAL_NTP_DOWNLOAD_FEATURE = "IPH_VideoTutorial_NTP_Download";
/**
* An IPH feature to show a video tutorial card on NTP to educate about how to search in chrome.
*/
String VIDEO_TUTORIAL_NTP_SEARCH_FEATURE = "IPH_VideoTutorial_NTP_Search";
/**
* An IPH feature to show a video tutorial card on NTP to educate about how to use voice search
* in chrome.
*/
String VIDEO_TUTORIAL_NTP_VOICE_SEARCH_FEATURE = "IPH_VideoTutorial_NTP_VoiceSearch";
/**
* An IPH feature to show a video tutorial summary card on NTP that takes them to see the video
* tutorial list page.
*/
String VIDEO_TUTORIAL_NTP_SUMMARY_FEATURE = "IPH_VideoTutorial_NTP_Summary";
/** /**
* An IPH feature to show on a card menu on the FeedNewTabPage. * An IPH feature to show on a card menu on the FeedNewTabPage.
......
...@@ -101,10 +101,16 @@ const base::Feature kIPHTabGroupsDragAndDropFeature{ ...@@ -101,10 +101,16 @@ const base::Feature kIPHTabGroupsDragAndDropFeature{
"IPH_TabGroupsDragAndDrop", base::FEATURE_DISABLED_BY_DEFAULT}; "IPH_TabGroupsDragAndDrop", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHTranslateMenuButtonFeature{ const base::Feature kIPHTranslateMenuButtonFeature{
"IPH_TranslateMenuButton", base::FEATURE_ENABLED_BY_DEFAULT}; "IPH_TranslateMenuButton", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kIPHVideoTutorialDownloadFeature{ const base::Feature kIPHVideoTutorialNTPChromeIntroFeature{
"IPH_VideoTutorial_Download", base::FEATURE_ENABLED_BY_DEFAULT}; "IPH_VideoTutorial_NTP_ChromeIntro", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHVideoTutorialSearchFeature{ const base::Feature kIPHVideoTutorialNTPDownloadFeature{
"IPH_VideoTutorial_Search", base::FEATURE_ENABLED_BY_DEFAULT}; "IPH_VideoTutorial_NTP_Download", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHVideoTutorialNTPSearchFeature{
"IPH_VideoTutorial_NTP_Search", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHVideoTutorialNTPVoiceSearchFeature{
"IPH_VideoTutorial_NTP_VoiceSearch", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHVideoTutorialNTPSummaryFeature{
"IPH_VideoTutorial_NTP_Summary", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHExploreSitesTileFeature{ const base::Feature kIPHExploreSitesTileFeature{
"IPH_ExploreSitesTile", base::FEATURE_DISABLED_BY_DEFAULT}; "IPH_ExploreSitesTile", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kIPHFeedHeaderMenuFeature{ const base::Feature kIPHFeedHeaderMenuFeature{
......
...@@ -69,8 +69,11 @@ extern const base::Feature kIPHTabGroupsTapToSeeAnotherTabFeature; ...@@ -69,8 +69,11 @@ extern const base::Feature kIPHTabGroupsTapToSeeAnotherTabFeature;
extern const base::Feature kIPHTabGroupsYourTabsAreTogetherFeature; extern const base::Feature kIPHTabGroupsYourTabsAreTogetherFeature;
extern const base::Feature kIPHTabGroupsDragAndDropFeature; extern const base::Feature kIPHTabGroupsDragAndDropFeature;
extern const base::Feature kIPHTranslateMenuButtonFeature; extern const base::Feature kIPHTranslateMenuButtonFeature;
extern const base::Feature kIPHVideoTutorialDownloadFeature; extern const base::Feature kIPHVideoTutorialNTPChromeIntroFeature;
extern const base::Feature kIPHVideoTutorialSearchFeature; extern const base::Feature kIPHVideoTutorialNTPDownloadFeature;
extern const base::Feature kIPHVideoTutorialNTPSearchFeature;
extern const base::Feature kIPHVideoTutorialNTPVoiceSearchFeature;
extern const base::Feature kIPHVideoTutorialNTPSummaryFeature;
extern const base::Feature kIPHExploreSitesTileFeature; extern const base::Feature kIPHExploreSitesTileFeature;
extern const base::Feature kIPHFeedHeaderMenuFeature; extern const base::Feature kIPHFeedHeaderMenuFeature;
extern const base::Feature kIPHChromeReengagementNotification1Feature; extern const base::Feature kIPHChromeReengagementNotification1Feature;
......
...@@ -52,8 +52,11 @@ const base::Feature* const kAllFeatures[] = { ...@@ -52,8 +52,11 @@ const base::Feature* const kAllFeatures[] = {
&kIPHTabGroupsYourTabsAreTogetherFeature, &kIPHTabGroupsYourTabsAreTogetherFeature,
&kIPHTabGroupsDragAndDropFeature, &kIPHTabGroupsDragAndDropFeature,
&kIPHTranslateMenuButtonFeature, &kIPHTranslateMenuButtonFeature,
&kIPHVideoTutorialDownloadFeature, &kIPHVideoTutorialNTPChromeIntroFeature,
&kIPHVideoTutorialSearchFeature, &kIPHVideoTutorialNTPDownloadFeature,
&kIPHVideoTutorialNTPSearchFeature,
&kIPHVideoTutorialNTPVoiceSearchFeature,
&kIPHVideoTutorialNTPSummaryFeature,
&kIPHExploreSitesTileFeature, &kIPHExploreSitesTileFeature,
&kIPHFeedHeaderMenuFeature, &kIPHFeedHeaderMenuFeature,
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
......
...@@ -106,10 +106,16 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsDragAndDropFeature, ...@@ -106,10 +106,16 @@ DEFINE_VARIATION_PARAM(kIPHTabGroupsDragAndDropFeature,
"IPH_TabGroupsDragAndDrop"); "IPH_TabGroupsDragAndDrop");
DEFINE_VARIATION_PARAM(kIPHTranslateMenuButtonFeature, DEFINE_VARIATION_PARAM(kIPHTranslateMenuButtonFeature,
"IPH_TranslateMenuButton"); "IPH_TranslateMenuButton");
DEFINE_VARIATION_PARAM(kIPHVideoTutorialDownloadFeature, DEFINE_VARIATION_PARAM(kIPHVideoTutorialNTPChromeIntroFeature,
"IPH_VideoTutorial_Download"); "IPH_VideoTutorial_NTP_ChromeIntro");
DEFINE_VARIATION_PARAM(kIPHVideoTutorialSearchFeature, DEFINE_VARIATION_PARAM(kIPHVideoTutorialNTPDownloadFeature,
"IPH_VideoTutorial_Search"); "IPH_VideoTutorial_NTP_Download");
DEFINE_VARIATION_PARAM(kIPHVideoTutorialNTPSearchFeature,
"IPH_VideoTutorial_NTP_Search");
DEFINE_VARIATION_PARAM(kIPHVideoTutorialNTPVoiceSearchFeature,
"IPH_VideoTutorial_NTP_VoiceSearch");
DEFINE_VARIATION_PARAM(kIPHVideoTutorialNTPSummaryFeature,
"IPH_VideoTutorial_NTP_Summary");
DEFINE_VARIATION_PARAM(kIPHExploreSitesTileFeature, "IPH_ExploreSitesTile"); DEFINE_VARIATION_PARAM(kIPHExploreSitesTileFeature, "IPH_ExploreSitesTile");
DEFINE_VARIATION_PARAM(kIPHFeedHeaderMenuFeature, "IPH_FeedHeaderMenu"); DEFINE_VARIATION_PARAM(kIPHFeedHeaderMenuFeature, "IPH_FeedHeaderMenu");
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
...@@ -184,8 +190,11 @@ constexpr flags_ui::FeatureEntry::FeatureVariation ...@@ -184,8 +190,11 @@ constexpr flags_ui::FeatureEntry::FeatureVariation
VARIATION_ENTRY(kIPHTabGroupsYourTabsAreTogetherFeature), VARIATION_ENTRY(kIPHTabGroupsYourTabsAreTogetherFeature),
VARIATION_ENTRY(kIPHTabGroupsDragAndDropFeature), VARIATION_ENTRY(kIPHTabGroupsDragAndDropFeature),
VARIATION_ENTRY(kIPHTranslateMenuButtonFeature), VARIATION_ENTRY(kIPHTranslateMenuButtonFeature),
VARIATION_ENTRY(kIPHVideoTutorialDownloadFeature), VARIATION_ENTRY(kIPHVideoTutorialNTPChromeIntroFeature),
VARIATION_ENTRY(kIPHVideoTutorialSearchFeature), VARIATION_ENTRY(kIPHVideoTutorialNTPDownloadFeature),
VARIATION_ENTRY(kIPHVideoTutorialNTPSearchFeature),
VARIATION_ENTRY(kIPHVideoTutorialNTPVoiceSearchFeature),
VARIATION_ENTRY(kIPHVideoTutorialNTPSummaryFeature),
VARIATION_ENTRY(kIPHExploreSitesTileFeature), VARIATION_ENTRY(kIPHExploreSitesTileFeature),
VARIATION_ENTRY(kIPHFeedHeaderMenuFeature), VARIATION_ENTRY(kIPHFeedHeaderMenuFeature),
#elif defined(OS_IOS) #elif defined(OS_IOS)
......
...@@ -7206,6 +7206,31 @@ ...@@ -7206,6 +7206,31 @@
] ]
} }
], ],
"VideoTutorialChromeIntroStudy": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "VideoTutorialNTPChromeIntro",
"params": {
"availability": ">=0",
"event_1": "name:video_tutorial_iph_clicked_chrome_intro;comparator:==0;window:30;storage:30",
"event_2": "name:video_tutorial_iph_dismissed_chrome_intro;comparator:<10;window:30;storage:30",
"event_trigger": "name:tutorial_chrome_intro_iph_trigger;comparator:any;window:30;storage:30",
"event_used": "name:chrome_intro;comparator:any;window:30;storage:30",
"session_rate": "any",
"session_rate_impact": "none"
},
"enable_features": [
"IPH_VideoTutorial_NTP_ChromeIntro"
],
"disable_features": []
}
]
}
],
"VideoTutorialDownloadStudy": [ "VideoTutorialDownloadStudy": [
{ {
"platforms": [ "platforms": [
...@@ -7213,11 +7238,11 @@ ...@@ -7213,11 +7238,11 @@
], ],
"experiments": [ "experiments": [
{ {
"name": "VideoTutorialDownload", "name": "VideoTutorialNTPDownload",
"params": { "params": {
"availability": ">=0", "availability": ">=0",
"event_1": "name:download_completed;comparator:any;window:30;storage:30", "event_1": "name:download_completed;comparator:any;window:30;storage:30",
"event_2": "name:video_tutorial_iph_clicked_download;comparator:any;window:30;storage:30", "event_2": "name:video_tutorial_iph_clicked_download;comparator:==0;window:30;storage:30",
"event_3": "name:video_tutorial_iph_dismissed_download;comparator:<10;window:30;storage:30", "event_3": "name:video_tutorial_iph_dismissed_download;comparator:<10;window:30;storage:30",
"event_trigger": "name:tutorial_download_iph_trigger;comparator:any;window:30;storage:30", "event_trigger": "name:tutorial_download_iph_trigger;comparator:any;window:30;storage:30",
"event_used": "name:download;comparator:any;window:30;storage:30", "event_used": "name:download;comparator:any;window:30;storage:30",
...@@ -7225,7 +7250,7 @@ ...@@ -7225,7 +7250,7 @@
"session_rate_impact": "none" "session_rate_impact": "none"
}, },
"enable_features": [ "enable_features": [
"IPH_VideoTutorial_Download" "IPH_VideoTutorial_NTP_Download"
], ],
"disable_features": [] "disable_features": []
} }
...@@ -7239,11 +7264,11 @@ ...@@ -7239,11 +7264,11 @@
], ],
"experiments": [ "experiments": [
{ {
"name": "VideoTutorialSearch", "name": "VideoTutorialNTPSearch",
"params": { "params": {
"availability": ">=0", "availability": ">=0",
"event_1": "name:search_completed;comparator:any;window:30;storage:30", "event_1": "name:search_completed;comparator:any;window:30;storage:30",
"event_2": "name:video_tutorial_iph_clicked_search;comparator:any;window:30;storage:30", "event_2": "name:video_tutorial_iph_clicked_search;comparator:==0;window:30;storage:30",
"event_3": "name:video_tutorial_iph_dismissed_search;comparator:<10;window:30;storage:30", "event_3": "name:video_tutorial_iph_dismissed_search;comparator:<10;window:30;storage:30",
"event_trigger": "name:tutorial_search_iph_trigger;comparator:any;window:30;storage:30", "event_trigger": "name:tutorial_search_iph_trigger;comparator:any;window:30;storage:30",
"event_used": "name:omnibox_search;comparator:any;window:30;storage:30", "event_used": "name:omnibox_search;comparator:any;window:30;storage:30",
...@@ -7251,13 +7276,79 @@ ...@@ -7251,13 +7276,79 @@
"session_rate_impact": "none" "session_rate_impact": "none"
}, },
"enable_features": [ "enable_features": [
"IPH_VideoTutorial_Search" "IPH_VideoTutorial_NTP_Search"
],
"disable_features": []
}
]
}
],
"VideoTutorialSummaryStudy": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "VideoTutorialNTPSummary",
"params": {
"availability": ">=0",
"event_1": "name:video_tutorial_iph_clicked_summary;comparator:==0;window:30;storage:30",
"event_2": "name:video_tutorial_iph_dismissed_summary;comparator:<10;window:30;storage:30",
"event_trigger": "name:tutorial_summary_iph_trigger;comparator:any;window:30;storage:30",
"event_used": "name:summary;comparator:any;window:30;storage:30",
"session_rate": "any",
"session_rate_impact": "none"
},
"enable_features": [
"IPH_VideoTutorial_NTP_Summary"
],
"disable_features": []
}
]
}
],
"VideoTutorialVoiceSearchStudy": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "VideoTutorialNTPVoiceSearch",
"params": {
"availability": ">=0",
"event_1": "name:search_completed;comparator:any;window:30;storage:30",
"event_2": "name:video_tutorial_iph_clicked_voice_search;comparator:==0;window:30;storage:30",
"event_3": "name:video_tutorial_iph_dismissed_voice_search;comparator:<10;window:30;storage:30",
"event_trigger": "name:tutorial_voice_search_iph_trigger;comparator:any;window:30;storage:30",
"event_used": "name:voice_search;comparator:any;window:30;storage:30",
"session_rate": "any",
"session_rate_impact": "none"
},
"enable_features": [
"IPH_VideoTutorial_NTP_VoiceSearch"
], ],
"disable_features": [] "disable_features": []
} }
] ]
} }
], ],
"VideoTutorials": [
{
"platforms": [
"android"
],
"experiments": [
{
"name": "Enabled",
"enable_features": [
"VideoTutorials"
]
}
]
}
],
"VizForWebView": [ "VizForWebView": [
{ {
"platforms": [ "platforms": [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment