Commit 91fafe9e authored by kkimlabs@chromium.org's avatar kkimlabs@chromium.org

[Android] Add a field trial to disable enhanced bookmark image saving.

We will be saving bookmark salient images even if enhanced bookmark
feature is not turned on. This is to have some images available when we
turn on the feature. For just in case, add a field trial to disable
saving images.

BUG=368034

Review URL: https://codereview.chromium.org/314253002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275381 0039d316-1c4b-4281-b951-d872f2087c98
parent 86e8855e
......@@ -174,6 +174,22 @@ bool IsEnhancedBookmarksExperimentEnabled() {
return IsEnhancedBookmarksExperimentEnabledFromFinch();
}
#if defined(OS_ANDROID)
bool IsEnhancedBookmarkImageFetchingEnabled() {
if (IsEnhancedBookmarksExperimentEnabled())
return true;
// Salient images are collected from visited bookmarked pages even if the
// enhanced bookmark feature is turned off. This is to have some images
// available so that in the future, when the feature is turned on, the user
// experience is not a big list of flat colors. However as a precautionary
// measure it is possible to disable this collection of images from finch.
std::string disable_fetching = chrome_variations::GetVariationParamValue(
kFieldTrialName, "DisableImagesFetching");
return disable_fetching.empty();
}
#endif
bool IsEnableDomDistillerSet() {
if (CommandLine::ForCurrentProcess()->
HasSwitch(switches::kEnableDomDistiller)) {
......
......@@ -47,6 +47,10 @@ void ForceFinchBookmarkExperimentIfNeeded(
// Experiment could be enable from Chrome sync or from Finch.
bool IsEnhancedBookmarksExperimentEnabled();
#if defined(OS_ANDROID)
bool IsEnhancedBookmarkImageFetchingEnabled();
#endif
// Returns true when flag enable-dom-distiller is set or enabled from Finch.
bool IsEnableDomDistillerSet();
......
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