From: Serg <serg.zhukovsky@gmail.com>
Date: Wed, 22 Mar 2017 19:10:30 -0400
Subject: Remove background sync and translate menu options

---
 .../java/res/drawable-hdpi/settings_translate.png  | Bin 399 -> 0 bytes
 .../java/res/drawable-mdpi/settings_translate.png  | Bin 284 -> 0 bytes
 .../java/res/drawable-xhdpi/settings_translate.png | Bin 547 -> 0 bytes
 .../res/drawable-xxhdpi/settings_translate.png     | Bin 793 -> 0 bytes
 .../res/drawable-xxxhdpi/settings_translate.png    | Bin 1038 -> 0 bytes
 .../java/res/xml/site_settings_preferences.xml     |   8 ++++----
 .../website/SiteSettingsPreferences.java           |  22 ++-------------------
 7 files changed, 6 insertions(+), 24 deletions(-)
 delete mode 100644 chrome/android/java/res/drawable-hdpi/settings_translate.png
 delete mode 100644 chrome/android/java/res/drawable-mdpi/settings_translate.png
 delete mode 100644 chrome/android/java/res/drawable-xhdpi/settings_translate.png
 delete mode 100644 chrome/android/java/res/drawable-xxhdpi/settings_translate.png
 delete mode 100644 chrome/android/java/res/drawable-xxxhdpi/settings_translate.png

diff --git a/chrome/android/java/res/drawable-hdpi/settings_translate.png b/chrome/android/java/res/drawable-hdpi/settings_translate.png
deleted file mode 100644
index 8067680e81c6ffa1a003c579411173827a3a9f96..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 399
zcmV;A0dW3_P)<h;3K|Lk000e1NJLTq001Na001Ni1ONa4O9@aD00042Nkl<ZcwWuc
zJxjwt0LJme7er{c_yr2Oml}2V3s~G9aP6!}z(tU5et?4AT-<~%x+sFhO}e^tsU(Y=
z0hgddd^pNsLc+Z{l>hP^9KR_C@$!FaVIla45F@WCMg$)o)DW3mQKSdON+{NY%D^rw
zQ6|u}ti|NX7$R7iF@)z*9c+qa0?AUm<7d7%a4MD+^aKw>u^zc5))3o43mLu<Vh_0s
z^onI1i*NbG31VmP*$I~u^o9@~3%Mjy{|2j}Ph4OPO<b`i*Ms^ERzc?^JnUm8&>5G;
z8!SRo0o`C5w_HXQp+hq2?!?{u8c0%8C3Jue>()aulqxVESiz93aydblXyA)AxSXIZ
z^u+3MIY49igeSZ=wug@XJ`tWQp%m)~(480Xl-fZ9?!ILEyg9Ig+E_v&p@gTlA*4tf
tij`2N2SrL~qywpbE;5V|EcpMCd%u4DGPZTzo=E@z002ovPDHLkV1m$asKNjM

diff --git a/chrome/android/java/res/drawable-mdpi/settings_translate.png b/chrome/android/java/res/drawable-mdpi/settings_translate.png
deleted file mode 100644
index 3b9b4cd482d36a60d4ff0a110b0bcefabe4c1060..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 284
zcmV+%0ptFOP)<h;3K|Lk000e1NJLTq000;O000;W1ONa4N`Cco0002vNkl<ZcwV*C
zy$-=p90hPI21^H{kVr7~0h$;*gq(zkcms==tbG8pC$M2)sTe$f#Kz1feE^(W(wipt
z>YqeTIHw=KscAEhFY_CKhZ7#j@Qh~#`t~HT1AWt&iOFYBic(;rl@5Y9UG&&#fH`9r
zbqhPT0Nhc-8hg~aB!JnVj0zT9La;<0Ijq#SJr@m*036I22Uj!E;6TtuAD4*o-y97Z
ziWuYbs-FagXn-mvsLH_>O?Hzl1RVtIfGq+yWZ%bGZULC0h?xp|DgiD=uf=xl!2Uvo
icHkLEh=B&e`~;qlBW{m=6s{@&0000<MNUMnLSTX)y>C|l

diff --git a/chrome/android/java/res/drawable-xhdpi/settings_translate.png b/chrome/android/java/res/drawable-xhdpi/settings_translate.png
deleted file mode 100644
index 131a57394ca30dcff4bebcb2471bbbf0e1ac134e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 547
zcmV+;0^I$HP)<h;3K|Lk000e1NJLTq001xm001xu1ONa4{R=S+0005%Nkl<ZcwX(-
zziU%b9ER~X&>vK2=pT?4!CJ8B5V|`lSO?MdsRak2|3E2<Ew~ov3nC6K4yBGdHyIT=
z*iKQTa&gEaRP2_R<9E1(_FiJ{F<-%<Je=X3K5*}FI12x`^1wNOsFIKphLn;}MY&1<
zRa%6SwW!7e2_d2+9!QG-C&)S}0;KUkhyudj0~b#<hpahU{YD2gq>+I}uBO%C0%8~2
zqX2{ZjJTXFC*U;?c-ddi5s!R<4~S{LXX_djTCRX~3-JV7yh7Y2cms!wTkrY83}bwB
z2dpi`B^D8n3HSqaSVYzpI`{+pWDRAl*>VMX>`+5Y@YI?>wsz=YK)L(kPe6xV>d0E+
zF#Fw0h$>%W?u)^|9b`@O%&0zU>qXpsF&Oy9RW@l8a&@DCv<Q46cvb|~;{k3U>t;Ei
z!kb9ohzhbQ9F+l#U_I(XZ6fPFVyg@=tm03vA!hhtr^YXT;4QKq66}a~{=i*iH3)XZ
zJ#V1R7-E(l!Okq>w0(hXWNl<?1F`K3EFkM3TL*{*PoRnN1<~{aRuPk2Kh<Oqt6sn{
zQ;3x_<Vp}z9QyzXvi8mZd)X7f1*jwDbN5@1`5@{JK-uDfGz#d(14$IH9}C1i5_>Gi
l0_C5%UG`c2pI-Xsz;EN&!BMZ3jZy#r002ovPDHLkV1l>+@2da+

diff --git a/chrome/android/java/res/drawable-xxhdpi/settings_translate.png b/chrome/android/java/res/drawable-xxhdpi/settings_translate.png
deleted file mode 100644
index 55878e697b1afed1b4f039a561dc6212e24fc024..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 793
zcmV+!1LpjRP)<h;3K|Lk000e1NJLTq002k;002k`1ONa4|Kxkj0008uNkl<ZcwX(=
z%}Z2a6vy!qU&7QD6$CjgbzuaFrMYX-gy1F-TYN#>*(&T0P^f5;ixxw==!FDzQOmLj
zW)TU|$~Iz9Aez>~5MeSGNzOdU;V@i=JI&0U$NLB~{9rb}%fp9z&%hk!M$92gIe;pl
z3Wyj9l9(csBteWw5h(;j9dXi_fJqal&Mqj9DKT-2AY!CT2BnGF10^sPlCTEKJIX71
z)JmT5wgxg*K&DJUmwnQupf11mfI$K*D&+>^c2@3W<t}H1aS^@Zph5Z5CZJigaScjR
zMTBa$!Uuig{eHe=HE-q67$$tsm>kf|A8$jyfS$PkZE!?L6P{+3Y9btC#|6l6Q$SJA
zJsJ|?2*wTQCyfHQr_G#j>iOXcWOyKi8a`n7&M5)i$G8LSaX}DgSmV5K&hghJ$naGk
zn|yMVCHFr+W;};YV_bu_81R4w*m4VcMRV41&CGcb!S=Xdpk;b9jBZ}iok8`oEP#^s
zxZ*(HxIwJ~nwTJkA;knuN_trO9#=T%BSV6b(8Ic?TcZbSdt70l>n4JR)6DpO>*nq3
zafN}FIj#?Cl$~5NU<H)S4chdQct;y?eqjzexj|EYm%9W-*|Z3FLPYa42uQ+JQr19S
z8PKI*ASGG4OG`vN`5X|W4{pi=YD6F%bO`8HV30TDOK#3CCj|0{M*=#@u3OM^=^OdI
zpGG0Qa0|L3{jfB{0*bi=tx_fZf;0;Ps$$h0XjBJU8y)O1SD-zjI?&qaU`I*00lm%)
zv^JT+e&Yso%`?y%9qc|Apbcs~1Fg})u4N;9(71N~84n-S`d?6M*r0iB`k2m2pEmR1
zf(Er&%x+lJW-v@pl6q-6F+S;(uAXFgph;~W`+^>8I~g9RU77~AeL>qaNZ%d;C_u^s
zlss&pgcZ=5Jy6WbGCgY#WaDr39a`*x^u>dcIQ=590n!A0HN&vZEG?C{V=ABuDD3<L
X<=DewY$H`b00000NkvXXu0mjfrJ!K8

diff --git a/chrome/android/java/res/drawable-xxxhdpi/settings_translate.png b/chrome/android/java/res/drawable-xxxhdpi/settings_translate.png
deleted file mode 100644
index 058b50b84dd216d983e9dea2ea264b39773ac318..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1038
zcmV+p1o8WcP)<h;3K|Lk000e1NJLTq003YB003YJ1ONa4NRhv@000BkNkl<ZcwX(>
zK}Zx)90u@NR77ZDqzI8+I%LtIBq1>CB9(`rB#V~#N{sTXQQ#UFR4mj+L_yL)FVdw5
zWziyt2t7o(5K@$fpoFMU*4D8)xU9Pq43Ec~9k(6b`LAza_%8CfJov%x+j;ZfQFNEb
z12`KG-~l{<2LKCHg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jK>P)UbW5mEs8p!*B_)Bwsy8PjNj
zLJc5zn3UxUnxN1F9DJOYCxvN5;D?e6@Sf=Q03N^tcmNOZ5BbKcjE%x^TL1t607*qo
IM6N<$g2Gw1A^-pY

diff --git a/chrome/android/java/res/xml/site_settings_preferences.xml b/chrome/android/java/res/xml/site_settings_preferences.xml
--- a/chrome/android/java/res/xml/site_settings_preferences.xml
+++ b/chrome/android/java/res/xml/site_settings_preferences.xml
@@ -50,9 +50,9 @@
         android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
         android:key="ads" />
     <!-- Background sync -->
-    <org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
+    <!-- org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
         android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
-        android:key="background_sync" />
+        android:key="background_sync" /-->
     <!-- Automatic Downloads -->
     <org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
         android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
@@ -77,11 +77,11 @@
         android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
         android:key="sound" />
     <!-- Google Translate -->
-    <Preference
+    <!-- Preference
         android:fragment="org.chromium.chrome.browser.preferences.website.TranslatePreferences"
         android:key="translate"
         android:title="@string/google_translate"
-        android:icon="@drawable/settings_translate" />
+        android:icon="@drawable/settings_translate" /-->
     <!-- Storage -->
     <!-- TODO(finnur): Move this over to the new Usage screen, once it exists. -->
     <org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
@@ -38,7 +38,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
     // are defined in the SiteSettingsCategory, additional keys
     // are listed here.
     static final String MEDIA_KEY = "media";
-    static final String TRANSLATE_KEY = "translate";
 
     // Whether the Protected Content menu is available for display.
     boolean mProtectedContentMenuAvailable;
@@ -82,11 +81,10 @@ public class SiteSettingsPreferences extends PreferenceFragment
             // The Media sub-menu only contains Protected Content and Autoplay, so remove all other
             // menus.
             for (@Type int i = 0; i < Type.NUM_ENTRIES; i++) {
-                if (i == Type.AUTOPLAY || i == Type.PROTECTED_MEDIA) continue;
+                if (i == Type.AUTOPLAY || i == Type.PROTECTED_MEDIA || i == Type.BACKGROUND_SYNC) continue;
                 getPreferenceScreen().removePreference(findPreference(i));
             }
             getPreferenceScreen().removePreference(findPreference(MEDIA_KEY));
-            getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
         } else {
             // If both Autoplay and Protected Content menus are available, they'll be tucked under
             // the Media key. Otherwise, we can remove the Media menu entry.
@@ -105,11 +103,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
             if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CLIPBOARD_CONTENT_SETTING)) {
                 getPreferenceScreen().removePreference(findPreference(Type.CLIPBOARD));
             }
-            // The new Languages Preference *feature* is an advanced version of this translate
-            // preference. Once Languages Preference is enabled, remove this setting.
-            if (ChromeFeatureList.isEnabled(ChromeFeatureList.LANGUAGES_PREFERENCE)) {
-                getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
-            }
             if (!ChromeFeatureList.isEnabled(ChromeFeatureList.GENERIC_SENSOR_EXTRA_CLASSES)) {
                 getPreferenceScreen().removePreference(findPreference(Type.SENSORS));
             }
@@ -119,10 +112,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
     private void updatePreferenceStates() {
         PrefServiceBridge prefServiceBridge = PrefServiceBridge.getInstance();
 
-        // Translate preference.
-        Preference translatePref = findPreference(TRANSLATE_KEY);
-        if (translatePref != null) setTranslateStateSummary(translatePref);
-
         // Preferences that navigate to Website Settings.
         List<Integer> websitePrefs = new ArrayList<Integer>();
         if (mMediaSubMenu) {
@@ -139,7 +128,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
             if (!mProtectedContentMenuAvailable) {
                 websitePrefs.add(Type.AUTOPLAY);
             }
-            websitePrefs.add(Type.BACKGROUND_SYNC);
+//            websitePrefs.add(Type.BACKGROUND_SYNC);
             websitePrefs.add(Type.CAMERA);
             if (ChromeFeatureList.isEnabled(ChromeFeatureList.CLIPBOARD_CONTENT_SETTING)) {
                 websitePrefs.add(Type.CLIPBOARD);
@@ -236,11 +225,4 @@ public class SiteSettingsPreferences extends PreferenceFragment
                 preference.getTitle().toString());
         return false;
     }
-
-    private void setTranslateStateSummary(Preference translatePref) {
-        boolean translateEnabled = PrefServiceBridge.getInstance().isTranslateEnabled();
-        translatePref.setSummary(translateEnabled
-                ? R.string.website_settings_category_ask
-                : R.string.website_settings_category_blocked);
-    }
 }
-- 
2.11.0

