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

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

Issue 2651233002: Enable download home by default (Closed)
Patch Set: rebase Created 3 years, 11 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 f25b10a1ff643ff63883c773e66608d1662f8725..ece6a6d300ad07787db37af4aced54c0cf739112 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
@@ -561,8 +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 DownloadUtils.isDownloadHomeEnabled() && shouldShowPageActionButtons()
- && !tab.isIncognito();
+ return shouldShowPageActionButtons() && !tab.isIncognito();
}
private boolean isSaveOfflineButtonEnabled() {
@@ -573,19 +572,15 @@ public class LocationBarTablet extends LocationBarLayout {
private boolean shouldShowPageActionButtons() {
if (!mNativeInitialized) return true;
- // If the new downloads UI isn't enabled, the only page action is the bookmark button. It
- // 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() && !DownloadUtils.isDownloadHomeEnabled())
- || !(mUrlBar.hasFocus() || mUrlFocusChangeInProgress);
+ // There are two actions, bookmark and save offline, and they should be shown if the
+ // omnibox isn't focused.
+ return !(mUrlBar.hasFocus() || mUrlFocusChangeInProgress);
}
private boolean shouldShowMicButton() {
// If the download UI is enabled, the mic button should be only be shown when the url bar
// is focused.
return isVoiceSearchEnabled() && mNativeInitialized
- && (!DownloadUtils.isDownloadHomeEnabled()
- || (mUrlBar.hasFocus() || mUrlFocusChangeInProgress));
+ && (mUrlBar.hasFocus() || mUrlFocusChangeInProgress);
}
}

Powered by Google App Engine
This is Rietveld 408576698