Commit 7bcbafc1 authored by Alexandre Frechette's avatar Alexandre Frechette Committed by Commit Bot

Removing manual translate feature in Clank.

Change-Id: I7b8dafb5a97f93104147f2482f3fbda0857d34ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744333Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Alexandre Frechette <frechette@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685547}
parent c715928e
...@@ -322,7 +322,6 @@ public abstract class ChromeFeatureList { ...@@ -322,7 +322,6 @@ public abstract class ChromeFeatureList {
public static final String TAB_SWITCHER_ON_RETURN = "TabSwitcherOnReturn"; public static final String TAB_SWITCHER_ON_RETURN = "TabSwitcherOnReturn";
public static final String TAB_TO_GTS_ANIMATION = "TabToGTSAnimation"; public static final String TAB_TO_GTS_ANIMATION = "TabToGTSAnimation";
public static final String TOUCH_TO_FILL_ANDROID = "TouchToFillAndroid"; public static final String TOUCH_TO_FILL_ANDROID = "TouchToFillAndroid";
public static final String TRANSLATE_ANDROID_MANUAL_TRIGGER = "TranslateAndroidManualTrigger";
public static final String TRUSTED_WEB_ACTIVITY = "TrustedWebActivity"; public static final String TRUSTED_WEB_ACTIVITY = "TrustedWebActivity";
public static final String TRUSTED_WEB_ACTIVITY_POST_MESSAGE = "TrustedWebActivityPostMessage"; public static final String TRUSTED_WEB_ACTIVITY_POST_MESSAGE = "TrustedWebActivityPostMessage";
public static final String TRUSTED_WEB_ACTIVITY_NOTIFICATION_DELEGATION_ENROLMENT = public static final String TRUSTED_WEB_ACTIVITY_NOTIFICATION_DELEGATION_ENROLMENT =
......
...@@ -25,7 +25,6 @@ import org.chromium.base.ObservableSupplier; ...@@ -25,7 +25,6 @@ import org.chromium.base.ObservableSupplier;
import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordHistogram;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.browser.ShortcutHelper; import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.banners.AppBannerManager; import org.chromium.chrome.browser.banners.AppBannerManager;
...@@ -343,12 +342,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate ...@@ -343,12 +342,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
*/ */
protected void prepareTranslateMenuItem(Menu menu, Tab currentTab) { protected void prepareTranslateMenuItem(Menu menu, Tab currentTab) {
boolean isTranslateVisible = isTranslateMenuItemVisible(currentTab); boolean isTranslateVisible = isTranslateMenuItemVisible(currentTab);
if (ChromeFeatureList.isInitialized() RecordHistogram.recordBooleanHistogram(
&& ChromeFeatureList.isEnabled( "Translate.MobileMenuTranslate.Shown", isTranslateVisible);
ChromeFeatureList.TRANSLATE_ANDROID_MANUAL_TRIGGER)) {
RecordHistogram.recordBooleanHistogram(
"Translate.MobileMenuTranslate.Shown", isTranslateVisible);
}
menu.findItem(R.id.translate_id).setVisible(isTranslateVisible); menu.findItem(R.id.translate_id).setVisible(isTranslateVisible);
} }
...@@ -481,8 +476,6 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate ...@@ -481,8 +476,6 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
boolean isFileScheme = url.startsWith(UrlConstants.FILE_URL_PREFIX); boolean isFileScheme = url.startsWith(UrlConstants.FILE_URL_PREFIX);
boolean isContentScheme = url.startsWith(UrlConstants.CONTENT_URL_PREFIX); boolean isContentScheme = url.startsWith(UrlConstants.CONTENT_URL_PREFIX);
return !isChromeScheme && !isFileScheme && !isContentScheme && !TextUtils.isEmpty(url) return !isChromeScheme && !isFileScheme && !isContentScheme && !TextUtils.isEmpty(url)
&& tab.getWebContents() != null && ChromeFeatureList.isInitialized() && tab.getWebContents() != null && TranslateBridge.canManuallyTranslate(tab);
&& ChromeFeatureList.isEnabled(ChromeFeatureList.TRANSLATE_ANDROID_MANUAL_TRIGGER)
&& TranslateBridge.canManuallyTranslate(tab);
} }
} }
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "components/signin/public/base/account_consistency_method.h" #include "components/signin/public/base/account_consistency_method.h"
#include "components/subresource_filter/core/browser/subresource_filter_features.h" #include "components/subresource_filter/core/browser/subresource_filter_features.h"
#include "components/sync/driver/sync_driver_switches.h" #include "components/sync/driver/sync_driver_switches.h"
#include "components/translate/core/browser/translate_prefs.h"
#include "components/unified_consent/feature.h" #include "components/unified_consent/feature.h"
#include "content/public/common/content_features.h" #include "content/public/common/content_features.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
...@@ -215,7 +214,6 @@ const base::Feature* kFeaturesExposedToJava[] = { ...@@ -215,7 +214,6 @@ const base::Feature* kFeaturesExposedToJava[] = {
&signin::kMiceFeature, &signin::kMiceFeature,
&switches::kSyncManualStartAndroid, &switches::kSyncManualStartAndroid,
&switches::kSyncSendTabToSelf, &switches::kSyncSendTabToSelf,
&translate::kTranslateMobileManualTrigger,
&unified_consent::kUnifiedConsent, &unified_consent::kUnifiedConsent,
&subresource_filter::kSafeBrowsingSubresourceFilter, &subresource_filter::kSafeBrowsingSubresourceFilter,
}; };
......
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