Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3378)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java

Issue 2372313002: [Download Home] More effectively disable Download Home (Closed)
Patch Set: Rebasing Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
index b16f040fb9fbb2dc3472514cb547bd203d222e42..f25b10a1ff643ff63883c773e66608d1662f8725 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
@@ -18,7 +18,6 @@ import android.view.WindowManager;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
-import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.download.DownloadUtils;
import org.chromium.chrome.browser.ntp.NewTabPage;
import org.chromium.chrome.browser.tab.Tab;
@@ -562,7 +561,7 @@ public class LocationBarTablet extends LocationBarLayout {
if (tab == null) return false;
// The save offline button should not be shown on native pages. Currently, trying to
// save an offline page in incognito crashes, so don't show it on incognito either.
- return ChromeFeatureList.isEnabled("DownloadsUi") && shouldShowPageActionButtons()
+ return DownloadUtils.isDownloadHomeEnabled() && shouldShowPageActionButtons()
&& !tab.isIncognito();
}
@@ -578,7 +577,7 @@ public class LocationBarTablet extends LocationBarLayout {
// should be shown if the delete button isn't showing. If the download UI is enabled, there
// are two actions, bookmark and save offline, and they should be shown if the omnibox isn't
// focused.
- return (!shouldShowDeleteButton() && !ChromeFeatureList.isEnabled("DownloadsUi"))
+ return (!shouldShowDeleteButton() && !DownloadUtils.isDownloadHomeEnabled())
|| !(mUrlBar.hasFocus() || mUrlFocusChangeInProgress);
}
@@ -586,7 +585,7 @@ public class LocationBarTablet extends LocationBarLayout {
// If the download UI is enabled, the mic button should be only be shown when the url bar
// is focused.
return isVoiceSearchEnabled() && mNativeInitialized
- && (!ChromeFeatureList.isEnabled("DownloadsUi")
+ && (!DownloadUtils.isDownloadHomeEnabled()
|| (mUrlBar.hasFocus() || mUrlFocusChangeInProgress));
}
}

Powered by Google App Engine
This is Rietveld 408576698