From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 2 Aug 2019 21:11:17 -0400
Subject: [PATCH] remove translate offer preference

---
 .../language/settings/LanguageSettings.java   | 29 +------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
index 0b4da85180efb..2e0540d8cccd4 100644
--- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
+++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
@@ -97,34 +97,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment
                 (ContentLanguagesPreference) findPreference(PREFERRED_LANGUAGES_KEY);
         mLanguageListPref.initialize(this, getPrefService());
 
-        ChromeSwitchPreference translateSwitch =
-                (ChromeSwitchPreference) findPreference(TRANSLATE_SWITCH_KEY);
-        boolean isTranslateEnabled = getPrefService().getBoolean(Pref.OFFER_TRANSLATE_ENABLED);
-        translateSwitch.setChecked(isTranslateEnabled);
-
-        translateSwitch.setOnPreferenceChangeListener(
-                new Preference.OnPreferenceChangeListener() {
-                    @Override
-                    public boolean onPreferenceChange(Preference preference, Object newValue) {
-                        boolean enabled = (boolean) newValue;
-                        getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, enabled);
-                        mLanguageListPref.notifyPrefChanged();
-                        LanguagesManager.recordAction(
-                                enabled
-                                        ? LanguagesManager.LanguageSettingsActionType
-                                                .ENABLE_TRANSLATE_GLOBALLY
-                                        : LanguagesManager.LanguageSettingsActionType
-                                                .DISABLE_TRANSLATE_GLOBALLY);
-                        return true;
-                    }
-                });
-        translateSwitch.setManagedPreferenceDelegate(
-                new ChromeManagedPreferenceDelegate(getProfile()) {
-                    @Override
-                    public boolean isPreferenceControlledByPolicy(Preference preference) {
-                        return getPrefService().isManagedPreference(Pref.OFFER_TRANSLATE_ENABLED);
-                    }
-                });
+        getPreferenceScreen().removePreference(findPreference(TRANSLATE_SWITCH_KEY));
     }
 
     /**
