Commit e950badf authored by Daniel Park's avatar Daniel Park Committed by Commit Bot

[Home Button] Don't cache home page settings if OEM enabled

Bug: 832212
Change-Id: If9f76cf12ac58c8367c16275796acd2e38847051
Reviewed-on: https://chromium-review.googlesource.com/1010837Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Daniel Park <danielpark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550326}
parent 7c6b6d50
...@@ -135,7 +135,7 @@ public class PartnerBrowserCustomizations { ...@@ -135,7 +135,7 @@ public class PartnerBrowserCustomizations {
* this method reads is not initialized until the asynchronous initialization of this * this method reads is not initialized until the asynchronous initialization of this
* class has been completed. * class has been completed.
*/ */
static boolean isHomepageProviderAvailableAndEnabled() { public static boolean isHomepageProviderAvailableAndEnabled() {
return !TextUtils.isEmpty(getHomePageUrl()); return !TextUtils.isEmpty(getHomePageUrl());
} }
......
...@@ -25,6 +25,7 @@ import org.chromium.chrome.browser.ChromeFeatureList; ...@@ -25,6 +25,7 @@ import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.firstrun.FirstRunUtils; import org.chromium.chrome.browser.firstrun.FirstRunUtils;
import org.chromium.chrome.browser.locale.LocaleManager; import org.chromium.chrome.browser.locale.LocaleManager;
import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations;
import org.chromium.chrome.browser.preferences.ChromePreferenceManager; import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin; import org.chromium.chrome.browser.tabmodel.DocumentModeAssassin;
import org.chromium.components.signin.AccountManagerFacade; import org.chromium.components.signin.AccountManagerFacade;
...@@ -188,6 +189,7 @@ public class FeatureUtilities { ...@@ -188,6 +189,7 @@ public class FeatureUtilities {
* be made available immediately. * be made available immediately.
*/ */
public static void cacheHomePageButtonForceEnabled() { public static void cacheHomePageButtonForceEnabled() {
if (PartnerBrowserCustomizations.isHomepageProviderAvailableAndEnabled()) return;
ChromePreferenceManager.getInstance().setHomePageButtonForceEnabled( ChromePreferenceManager.getInstance().setHomePageButtonForceEnabled(
ChromeFeatureList.isEnabled(ChromeFeatureList.HOME_PAGE_BUTTON_FORCE_ENABLED)); ChromeFeatureList.isEnabled(ChromeFeatureList.HOME_PAGE_BUTTON_FORCE_ENABLED));
} }
......
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