Release 94.0.4606.102
This commit is contained in:
parent
3787e8e9af
commit
5a25a4d9ea
18 changed files with 256 additions and 358 deletions
|
@ -1,3 +1,9 @@
|
|||
# 94.0.4606.102
|
||||
* add flag to disable pull-to-refresh effect
|
||||
* add recents, offlinepage and send to home screen for always incognito (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1182 and https://github.com/bromite/bromite/issues/1362)
|
||||
* prompt to restart when always-incognito is enabled
|
||||
* merge patches for custom tab intents
|
||||
|
||||
# 94.0.4606.94
|
||||
* Bromite auto-update feature, disabled by default (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/706)
|
||||
* add site setting for images (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1339)
|
||||
|
|
|
@ -1 +1 @@
|
|||
94.0.4606.94
|
||||
94.0.4606.102
|
||||
|
|
|
@ -156,8 +156,9 @@ Override-UA-client-hint-for-model.patch
|
|||
Disable-AGSA-by-default.patch
|
||||
Allow-building-without-enable_reporting.patch
|
||||
Disable-lock-icon-in-address-bar-by-default.patch
|
||||
Add-custom-tab-intents-privacy-option.patch
|
||||
Enable-share-intent.patch
|
||||
Site-setting-for-images.patch
|
||||
Bromite-auto-updater.patch
|
||||
Add-flag-to-disable-pull-to-refresh-effect.patch
|
||||
Automated-domain-substitution.patch
|
||||
Add-intents-privacy-option.patch
|
|
@ -70,14 +70,14 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
|||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -54,6 +54,7 @@ public class PrivacySettings
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
@@ -50,6 +50,7 @@ import org.chromium.ui.text.SpanApplier;
|
||||
public class PrivacySettings
|
||||
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener,
|
||||
INeedSnackbarManager {
|
||||
+ private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
private SnackbarManager mSnackbarManager;
|
||||
private Snackbar mSnackbar;
|
||||
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
|
|
|
@ -2,17 +2,23 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|||
Date: Wed, 29 Aug 2018 11:03:44 +0200
|
||||
Subject: Add custom tab intents privacy option
|
||||
|
||||
Add custom tab intents privacy option and force
|
||||
open external links in incognito flag.
|
||||
|
||||
Flags are mutually exclusive.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/1474
|
||||
---
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/LaunchIntentDispatcher.java | 4 ++++
|
||||
.../browser/privacy/settings/PrivacySettings.java | 10 ++++++++++
|
||||
.../ui/android/strings/android_chrome_strings.grd | 7 +++++++
|
||||
4 files changed, 26 insertions(+)
|
||||
.../java/res/xml/privacy_preferences.xml | 10 ++++++
|
||||
.../browser/LaunchIntentDispatcher.java | 19 ++++++++++
|
||||
.../privacy/settings/PrivacySettings.java | 36 +++++++++++++++++++
|
||||
.../strings/android_chrome_strings.grd | 15 ++++++++
|
||||
4 files changed, 80 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -37,6 +37,11 @@
|
||||
@@ -56,6 +56,16 @@
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
android:title="@string/do_not_track_title"/>
|
||||
|
@ -20,6 +26,11 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
|||
+ android:key="allow_custom_tab_intents"
|
||||
+ android:title="@string/allow_custom_tab_intents_title"
|
||||
+ android:summary="@string/allow_custom_tab_intents_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="open_external_links_incognito"
|
||||
+ android:title="@string/open_external_links_incognito_title"
|
||||
+ android:summary="@string/open_external_links_incognito_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:key="privacy_sandbox"
|
||||
|
@ -36,45 +47,100 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis
|
|||
/**
|
||||
* Dispatches incoming intents to the appropriate activity based on the current configuration and
|
||||
* Intent fired.
|
||||
@@ -279,6 +281,8 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
@@ -279,6 +281,12 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
*/
|
||||
public static boolean isCustomTabIntent(Intent intent) {
|
||||
if (intent == null) return false;
|
||||
+ if (!ContextUtils.getAppSharedPreferences().getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ return false;
|
||||
+ if (!ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ return false;
|
||||
if (CustomTabsIntent.shouldAlwaysUseBrowserUI(intent)
|
||||
|| !intent.hasExtra(CustomTabsIntent.EXTRA_SESSION)) {
|
||||
return false;
|
||||
@@ -417,6 +425,17 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
|
||||
if (Intent.ACTION_VIEW.equals(newIntent.getAction())
|
||||
&& !IntentHandler.wasIntentSenderChrome(newIntent)) {
|
||||
+
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
+ PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false)) {
|
||||
+ Context applicationContext = ContextUtils.getApplicationContext();
|
||||
+ newIntent = IntentHandler.createTrustedOpenNewTabIntent(applicationContext,
|
||||
+ /*incognito*/true);
|
||||
+ newIntent.setData(mIntent.getData());
|
||||
+ newIntent.setPackage(applicationContext.getPackageName());
|
||||
+ newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
+ }
|
||||
+
|
||||
long time = SystemClock.elapsedRealtime();
|
||||
if (!chromeTabbedTaskExists()) {
|
||||
newIntent.putExtra(IntentHandler.EXTRA_STARTED_TABBED_CHROME_TASK, true);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -49,6 +49,7 @@ public class PrivacySettings
|
||||
private static final String PREF_SECURE_DNS = "secure_dns";
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
+ public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
@@ -90,6 +90,9 @@ public class PrivacySettings
|
||||
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
@@ -119,6 +120,10 @@ public class PrivacySettings
|
||||
} else if (PREF_HTTPS_FIRST_MODE.equals(key)) {
|
||||
|
||||
+ private ChromeSwitchPreference allowCustomTabIntentsPref;
|
||||
+ private ChromeSwitchPreference openExternalLinksPref;
|
||||
+
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
PrivacyPreferencesManagerImpl privacyPrefManager =
|
||||
@@ -191,6 +194,9 @@ public class PrivacySettings
|
||||
updateSummaries();
|
||||
}
|
||||
|
||||
+ public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
+ public static final String PREF_OPEN_EXTERNAL_LINKS_INCOGNITO = "open_external_links_incognito";
|
||||
+
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
@@ -222,6 +228,26 @@ public class PrivacySettings
|
||||
} else if (PREF_INCOGNITO_TAB_HISTORY_ENABLED.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue);
|
||||
.setBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED, (boolean) newValue);
|
||||
+ } else if (PREF_ALLOW_CUSTOM_TAB_INTENTS.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ openExternalLinksPref.setChecked(!(boolean)newValue);
|
||||
+ } else if (PREF_OPEN_EXTERNAL_LINKS_INCOGNITO.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ allowCustomTabIntentsPref.setChecked(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -142,6 +147,11 @@ public class PrivacySettings
|
||||
@@ -257,6 +283,16 @@ public class PrivacySettings
|
||||
canMakePaymentPref.setChecked(prefService.getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED));
|
||||
}
|
||||
|
||||
+ ChromeSwitchPreference allowCustomTabIntentsPref =
|
||||
+ allowCustomTabIntentsPref =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_ALLOW_CUSTOM_TAB_INTENTS);
|
||||
+ allowCustomTabIntentsPref.setOnPreferenceChangeListener(this);
|
||||
+ allowCustomTabIntentsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
+ openExternalLinksPref =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO);
|
||||
+ openExternalLinksPref.setOnPreferenceChangeListener(this);
|
||||
+ openExternalLinksPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK);
|
||||
if (doNotTrackPref != null) {
|
||||
|
@ -82,7 +148,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4405,6 +4405,13 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4496,6 +4496,21 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_NEAR_OOM_REDUCTION_DECLINE" desc="The text of the button letting the user decline the browser's intervention, so that the page can be reloaded.">
|
||||
Show original
|
||||
</message>
|
||||
|
@ -92,6 +158,14 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
+ </message>
|
||||
+ <message name="IDS_ALLOW_CUSTOM_TAB_INTENTS_SUMMARY" desc="Summary text for 'Allow custom tab intents' settings-privacy option.">
|
||||
+ Allow applications to open custom tab intents, similar to webview.
|
||||
+ </message>
|
||||
+
|
||||
+ <!-- Open External Links in Incognito -->
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_TITLE" desc="Text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Open external links in incognito
|
||||
+ </message>
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_SUMMARY" desc="Summary text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Force the opening of all external links in incognito mode
|
||||
+ </message>
|
||||
|
||||
<!-- Autofill Assistant preferences -->
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 18 Oct 2021 20:50:48 +0200
|
||||
Subject: Add flag to disable pull to refresh effect
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 6 ++++++
|
||||
chrome/browser/flag_descriptions.cc | 6 ++++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -7477,6 +7477,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kPrivacyReviewDescription, kOsDesktop | kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(features::kPrivacyReview)},
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+ {switches::kDisablePullToRefreshEffect, flag_descriptions::kDisablePullToRefreshEffectName,
|
||||
+ flag_descriptions::kDisablePullToRefreshEffectDescription, kOsAndroid,
|
||||
+ SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)},
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_ANDROID)
|
||||
{"google-mobile-services-passwords",
|
||||
flag_descriptions::kUnifiedPasswordManagerAndroidName,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1451,6 +1451,12 @@ const char kIncognitoClearBrowsingDataDialogForDesktopDescription[] =
|
||||
"When enabled, clear browsing data option would be enabled in Incognito "
|
||||
"which upon clicking would show a dialog to close all Incognito windows.";
|
||||
|
||||
+const char kDisablePullToRefreshEffectName[] =
|
||||
+ "Disable the pull-to-refresh effect when vertically overscrolling content.";
|
||||
+const char kDisablePullToRefreshEffectDescription[] =
|
||||
+ "Disable the pull-to-refresh effect with the elastic overscroll feature "
|
||||
+ "used to indicate that the user is scrolling beyond the range of the scrollable area.";
|
||||
+
|
||||
const char kUpdateHistoryEntryPointsInIncognitoName[] =
|
||||
"Update history entry points in Incognito.";
|
||||
const char kUpdateHistoryEntryPointsInIncognitoDescription[] =
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -564,6 +564,9 @@ extern const char kDiagnosticsAppDescription[];
|
||||
extern const char kDiagnosticsAppNavigationName[];
|
||||
extern const char kDiagnosticsAppNavigationDescription[];
|
||||
|
||||
+extern const char kDisablePullToRefreshEffectName[];
|
||||
+extern const char kDisablePullToRefreshEffectDescription[];
|
||||
+
|
||||
extern const char kDisableKeepaliveFetchName[];
|
||||
extern const char kDisableKeepaliveFetchDescription[];
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -3,7 +3,7 @@ Date: Fri, 7 Aug 2020 16:33:47 +0000
|
|||
Subject: Add history support in incognito mode
|
||||
|
||||
Add history, recents, offlinepages and send to home screen for always incognito.
|
||||
History, recent tabs and offline pages require the INCOGNITO_TAB_HISTORY_ENABLED
|
||||
History, recent tabs and offline pages require the INCOGNITO_TAB_HISTORY_ENABLED
|
||||
flag turned on.
|
||||
IncognitoPlaceholder is also deactivated, both in the phone and tablet version.
|
||||
The relative tests are also present.
|
||||
|
@ -56,7 +56,7 @@ See also: https://github.com/bromite/bromite/pull/1427
|
|||
diff --git a/chrome/android/chrome_junit_test_java_sources.gni b/chrome/android/chrome_junit_test_java_sources.gni
|
||||
--- a/chrome/android/chrome_junit_test_java_sources.gni
|
||||
+++ b/chrome/android/chrome_junit_test_java_sources.gni
|
||||
@@ -219,3 +219,7 @@ chrome_junit_test_java_sources = [
|
||||
@@ -225,3 +225,7 @@ chrome_junit_test_java_sources = [
|
||||
"junit/src/org/chromium/chrome/browser/webapps/WebappLauncherActivityTest.java",
|
||||
"junit/src/org/chromium/chrome/browser/webapps/WebappRegistryTest.java",
|
||||
]
|
||||
|
@ -68,7 +68,7 @@ diff --git a/chrome/android/chrome_junit_test_java_sources.gni b/chrome/android/
|
|||
diff --git a/chrome/android/chrome_test_java_sources.gni b/chrome/android/chrome_test_java_sources.gni
|
||||
--- a/chrome/android/chrome_test_java_sources.gni
|
||||
+++ b/chrome/android/chrome_test_java_sources.gni
|
||||
@@ -641,3 +641,9 @@ chrome_test_java_sources = [
|
||||
@@ -645,3 +645,9 @@ chrome_test_java_sources = [
|
||||
if (enable_feed_v2) {
|
||||
chrome_test_java_sources += [ "javatests/src/org/chromium/chrome/browser/ntp/NewTabPageColorWithFeedV2Test.java" ]
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
|||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
@@ -73,6 +73,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||
@@ -75,6 +75,10 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
|
|||
/**
|
||||
* Base implementation of {@link AppMenuPropertiesDelegate} that handles hiding and showing menu
|
||||
* items based on activity state.
|
||||
@@ -131,6 +135,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
@@ -133,6 +137,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
protected BookmarkBridge mBookmarkBridge;
|
||||
protected Runnable mAppMenuInvalidator;
|
||||
|
||||
|
@ -121,7 +121,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
|
|||
/**
|
||||
* Construct a new {@link AppMenuPropertiesDelegateImpl}.
|
||||
* @param context The activity context.
|
||||
@@ -364,7 +375,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
@@ -379,7 +390,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
|
||||
private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) {
|
||||
|
@ -131,7 +131,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
|
|||
final MenuItem newTabOption = menu.findItem(R.id.new_tab_menu_id);
|
||||
if (newTabOption != null)
|
||||
newTabOption.setVisible(false);
|
||||
@@ -417,7 +429,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
@@ -444,7 +456,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
|
||||
if (item.getItemId() == R.id.recent_tabs_menu_id) {
|
||||
|
@ -148,7 +148,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
|
|||
}
|
||||
if (item.getItemId() == R.id.menu_group_tabs) {
|
||||
item.setVisible(isMenuGroupTabsVisible);
|
||||
@@ -574,7 +594,10 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
@@ -632,7 +652,10 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
// is not persisted when adding to the homescreen.
|
||||
// * If creating shortcuts it not supported by the current home screen.
|
||||
return WebappsUtils.isAddToHomeIntentSupported() && !isChromeScheme && !isFileScheme
|
||||
|
@ -297,23 +297,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM
|
|||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -40,12 +40,15 @@ import org.chromium.components.user_prefs.UserPrefs;
|
||||
import org.chromium.ui.text.NoUnderlineClickableSpan;
|
||||
import org.chromium.ui.text.SpanApplier;
|
||||
@@ -18,6 +18,7 @@ import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
|
||||
import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.BuildInfo;
|
||||
+import org.chromium.base.Log;
|
||||
+
|
||||
/**
|
||||
* Fragment to keep track of the all the privacy related preferences.
|
||||
*/
|
||||
public class PrivacySettings
|
||||
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
|
||||
private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
+ public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
|
||||
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
|
||||
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
|
||||
private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode";
|
||||
@@ -110,6 +113,11 @@ public class PrivacySettings
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
@@ -137,6 +138,11 @@ public class PrivacySettings
|
||||
Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
|
||||
secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
|
||||
|
||||
|
@ -325,17 +317,24 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
updateSummaries();
|
||||
}
|
||||
|
||||
@@ -133,6 +141,9 @@ public class PrivacySettings
|
||||
SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
|
||||
sharedPreferencesEditor.apply();
|
||||
@@ -159,11 +165,16 @@ public class PrivacySettings
|
||||
} else if (PREF_HTTPS_FIRST_MODE.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue);
|
||||
+ } else if (PREF_INCOGNITO_TAB_HISTORY_ENABLED.equals(key)) {
|
||||
+ UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
+ .setBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED, (boolean) newValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -183,6 +194,13 @@ public class PrivacySettings
|
||||
}
|
||||
|
||||
+ public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
|
||||
+
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -204,6 +215,13 @@ public class PrivacySettings
|
||||
(ChromeSwitchPreference) findPreference(PREF_CLOSE_TABS_ON_EXIT);
|
||||
closeTabsOnExitPref.setOnPreferenceChangeListener(this);
|
||||
closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
|
@ -1339,9 +1338,9 @@ diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/histor
|
|||
diff --git a/chrome/browser/history/history_tab_helper_unittest.cc b/chrome/browser/history/history_tab_helper_unittest.cc
|
||||
--- a/chrome/browser/history/history_tab_helper_unittest.cc
|
||||
+++ b/chrome/browser/history/history_tab_helper_unittest.cc
|
||||
@@ -32,6 +32,9 @@
|
||||
#include "components/feed/core/v2/public/test/stub_feed_api.h"
|
||||
#endif
|
||||
@@ -39,6 +39,9 @@
|
||||
|
||||
using testing::NiceMock;
|
||||
|
||||
+#include "chrome/common/pref_names.h"
|
||||
+#include "content/test/test_web_contents.h"
|
||||
|
@ -1349,7 +1348,7 @@ diff --git a/chrome/browser/history/history_tab_helper_unittest.cc b/chrome/brow
|
|||
namespace {
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -264,4 +267,23 @@ TEST_F(HistoryTabHelperTest, FeedNavigationsDoNotContributeToMostVisited) {
|
||||
@@ -271,4 +274,23 @@ TEST_F(HistoryTabHelperTest, FeedNavigationsDoNotContributeToMostVisited) {
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1667,9 +1666,9 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -932,6 +932,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_ALWAYS_INCOGNITO_SUMMARY" desc="Summary for always incognito mode">
|
||||
Opens links in incognito tabs when you click on new tab or on a link
|
||||
@@ -938,6 +938,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_UI_RELAUNCH_NOTICE" desc="Summary for always incognito mode">
|
||||
Your changes will take effect the next time you relaunch Bromite.
|
||||
</message>
|
||||
+ <message name="IDS_INCOGNITO_HISTORY_ENABLED_TITLE" desc="Title for always enable history in incognito mode">
|
||||
+ Enable history in incognito tabs
|
||||
|
@ -1712,9 +1711,9 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
|||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -4638,6 +4638,11 @@ test("unit_tests") {
|
||||
"../../base/path_service_unittest.cc",
|
||||
]
|
||||
@@ -4669,6 +4669,11 @@ test("unit_tests") {
|
||||
]
|
||||
}
|
||||
|
||||
+ # Bromite tests
|
||||
+ sources += [
|
||||
|
|
|
@ -1,174 +0,0 @@
|
|||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 29 Aug 2018 11:03:44 +0200
|
||||
Subject: Add custom tab intents privacy option
|
||||
|
||||
Add custom tab intents privacy option and force
|
||||
open external links in incognito flag.
|
||||
|
||||
Flags are mutually exclusive.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/1474
|
||||
---
|
||||
.../java/res/xml/privacy_preferences.xml | 10 ++++++
|
||||
.../browser/LaunchIntentDispatcher.java | 19 ++++++++++
|
||||
.../privacy/settings/PrivacySettings.java | 35 +++++++++++++++++++
|
||||
.../strings/android_chrome_strings.grd | 15 ++++++++
|
||||
4 files changed, 79 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -56,6 +56,16 @@
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
android:title="@string/do_not_track_title"/>
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="allow_custom_tab_intents"
|
||||
+ android:title="@string/allow_custom_tab_intents_title"
|
||||
+ android:summary="@string/allow_custom_tab_intents_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="open_external_links_incognito"
|
||||
+ android:title="@string/open_external_links_incognito_title"
|
||||
+ android:summary="@string/open_external_links_incognito_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:key="privacy_sandbox"
|
||||
android:title="@string/prefs_privacy_sandbox"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
@@ -59,6 +59,8 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Set;
|
||||
|
||||
+import org.chromium.chrome.browser.privacy.settings.PrivacySettings;
|
||||
+
|
||||
/**
|
||||
* Dispatches incoming intents to the appropriate activity based on the current configuration and
|
||||
* Intent fired.
|
||||
@@ -279,6 +281,12 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
*/
|
||||
public static boolean isCustomTabIntent(Intent intent) {
|
||||
if (intent == null) return false;
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ return false;
|
||||
+ if (!ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ return false;
|
||||
if (CustomTabsIntent.shouldAlwaysUseBrowserUI(intent)
|
||||
|| !intent.hasExtra(CustomTabsIntent.EXTRA_SESSION)) {
|
||||
return false;
|
||||
@@ -417,6 +425,17 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
|
||||
if (Intent.ACTION_VIEW.equals(newIntent.getAction())
|
||||
&& !IntentHandler.wasIntentSenderChrome(newIntent)) {
|
||||
+
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
+ PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false)) {
|
||||
+ Context applicationContext = ContextUtils.getApplicationContext();
|
||||
+ newIntent = IntentHandler.createTrustedOpenNewTabIntent(applicationContext,
|
||||
+ /*incognito*/true);
|
||||
+ newIntent.setData(mIntent.getData());
|
||||
+ newIntent.setPackage(applicationContext.getPackageName());
|
||||
+ newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
+ }
|
||||
+
|
||||
long time = SystemClock.elapsedRealtime();
|
||||
if (!chromeTabbedTaskExists()) {
|
||||
newIntent.putExtra(IntentHandler.EXTRA_STARTED_TABBED_CHROME_TASK, true);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -66,6 +66,8 @@ public class PrivacySettings
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
+ public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
+ public static final String PREF_OPEN_EXTERNAL_LINKS_INCOGNITO = "open_external_links_incognito";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
private static final String PREF_FORCE_NO_JIT = "force_no_jit";
|
||||
|
||||
@@ -83,6 +85,9 @@ public class PrivacySettings
|
||||
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
|
||||
+ private ChromeSwitchPreference allowCustomTabIntentsPref;
|
||||
+ private ChromeSwitchPreference openExternalLinksPref;
|
||||
+
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
PrivacyPreferencesManagerImpl privacyPrefManager =
|
||||
@@ -193,6 +198,26 @@ public class PrivacySettings
|
||||
} else if (PREF_INCOGNITO_TAB_HISTORY_ENABLED.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED, (boolean) newValue);
|
||||
+ } else if (PREF_ALLOW_CUSTOM_TAB_INTENTS.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ openExternalLinksPref.setChecked(!(boolean)newValue);
|
||||
+ } else if (PREF_OPEN_EXTERNAL_LINKS_INCOGNITO.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ allowCustomTabIntentsPref.setChecked(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -226,6 +251,16 @@ public class PrivacySettings
|
||||
canMakePaymentPref.setChecked(prefService.getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED));
|
||||
}
|
||||
|
||||
+ allowCustomTabIntentsPref =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_ALLOW_CUSTOM_TAB_INTENTS);
|
||||
+ allowCustomTabIntentsPref.setOnPreferenceChangeListener(this);
|
||||
+ allowCustomTabIntentsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
+ openExternalLinksPref =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO);
|
||||
+ openExternalLinksPref.setOnPreferenceChangeListener(this);
|
||||
+ openExternalLinksPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK);
|
||||
if (doNotTrackPref != null) {
|
||||
doNotTrackPref.setSummary(prefService.getBoolean(Pref.ENABLE_DO_NOT_TRACK)
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4509,6 +4509,21 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_NEAR_OOM_REDUCTION_DECLINE" desc="The text of the button letting the user decline the browser's intervention, so that the page can be reloaded.">
|
||||
Show original
|
||||
</message>
|
||||
+ <!-- Allow custom tab intents -->
|
||||
+ <message name="IDS_ALLOW_CUSTOM_TAB_INTENTS_TITLE" desc="Text for 'Allow custom tab intents' settings-privacy option.">
|
||||
+ Allow custom tab intents
|
||||
+ </message>
|
||||
+ <message name="IDS_ALLOW_CUSTOM_TAB_INTENTS_SUMMARY" desc="Summary text for 'Allow custom tab intents' settings-privacy option.">
|
||||
+ Allow applications to open custom tab intents, similar to webview.
|
||||
+ </message>
|
||||
+
|
||||
+ <!-- Open External Links in Incognito -->
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_TITLE" desc="Text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Open external links in incognito
|
||||
+ </message>
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_SUMMARY" desc="Summary text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Force the opening of all external links in incognito mode
|
||||
+ </message>
|
||||
|
||||
<!-- Autofill Assistant preferences -->
|
||||
<!-- TODO(b/168178344): Move to Assistant settings strings section below. -->
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -377,7 +377,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -3218,6 +3218,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3224,6 +3224,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_TRACK_PRICES" desc="Menu item for tracking prices on tabs. [CHAR_LIMIT=27]">
|
||||
Track prices
|
||||
</message>
|
||||
|
|
|
@ -101,7 +101,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -1194,6 +1194,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1200,6 +1200,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_SAFE_BROWSING_NO_PROTECTION_CONFIRMATION_DIALOG_CONFIRM" desc="Message for Safe Browsing no protection confirmation button.">
|
||||
Turn off
|
||||
</message>
|
||||
|
|
|
@ -3,11 +3,11 @@ Date: Sat, 7 Sep 2019 15:07:42 +0200
|
|||
Subject: Add option to not persist tabs across sessions
|
||||
|
||||
---
|
||||
.../android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 4 +++-
|
||||
.../browser/privacy/settings/PrivacySettings.java | 15 ++++++++++++++-
|
||||
.../ui/android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
4 files changed, 28 insertions(+), 2 deletions(-)
|
||||
.../android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 4 +++-
|
||||
.../privacy/settings/PrivacySettings.java | 16 +++++++++++++++-
|
||||
.../android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
4 files changed, 29 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
|
@ -59,15 +59,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
@@ -50,6 +53,7 @@ public class PrivacySettings
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
@@ -59,6 +62,8 @@ public class PrivacySettings
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
|
||||
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
+
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
@@ -111,7 +115,11 @@ public class PrivacySettings
|
||||
|
||||
@Override
|
||||
@@ -137,7 +142,11 @@ public class PrivacySettings
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
|
@ -80,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
|
||||
@@ -169,6 +177,11 @@ public class PrivacySettings
|
||||
@@ -189,6 +198,11 @@ public class PrivacySettings
|
||||
privacySandboxPreference.setSummary(
|
||||
PrivacySandboxSettingsFragment.getStatusString(getContext()));
|
||||
}
|
||||
|
@ -95,7 +96,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4026,6 +4026,12 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4032,6 +4032,12 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
|
||||
IMAGE
|
||||
</message>
|
||||
|
|
|
@ -10,7 +10,7 @@ Subject: Add support for ISupportHelpAndFeedback
|
|||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
@@ -55,6 +55,7 @@ import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
@@ -56,6 +56,7 @@ import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable;
|
||||
import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher;
|
||||
import org.chromium.components.browser_ui.settings.SettingsLauncher;
|
||||
|
@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
|
|||
import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
|
||||
import org.chromium.ui.UiUtils;
|
||||
|
||||
@@ -248,9 +249,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
@@ -252,9 +253,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.menu_id_general_help) {
|
||||
|
|
|
@ -8221,7 +8221,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_CLEAR_CACHE_TITLE" desc="Title for Clear Cache in Clear Browsing Data dialog">
|
||||
Cached images and files
|
||||
@@ -985,10 +985,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -991,10 +991,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Record history even in incognito mode
|
||||
</message>
|
||||
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SIGNED_IN" desc="A text explaining other forms of activity for signed in users.">
|
||||
|
@ -8234,7 +8234,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_CLEAR_SEARCH_HISTORY_LINK" desc="Text informing the user that they can clear search history and other data using MyActivity.">
|
||||
<ph name="BEGIN_LINK1"><link1></ph>Search history<ph name="END_LINK1"></link1></ph> and <ph name="BEGIN_LINK2"><link2></ph>other forms of activity<ph name="END_LINK2"></link2></ph> may be saved in your Google Account when you’re signed in. You can delete them anytime.
|
||||
@@ -1057,7 +1057,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1063,7 +1063,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Basic
|
||||
</message>
|
||||
<message name="IDS_ANDROID_HISTORY_OTHER_FORMS_OF_HISTORY" desc="The notification at the top of the history page indicating that deleting Chrome browsing history will not delete other forms of history stored at Google My Activity.">
|
||||
|
@ -8243,7 +8243,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_ANDROID_HISTORY_BLOCKED_SITE" desc="The text displayed in the history page indicating that a visit to a web site was blocked due to an administrator policy.">
|
||||
Blocked site
|
||||
@@ -1479,7 +1479,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1485,7 +1485,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
In Lite mode, Chrome loads pages faster and uses up to 60 percent less data. To optimize the pages that you visit, Chrome sends your web traffic to Google. <ph name="BEGIN_LINK"><link></ph>Learn more<ph name="END_LINK"></link></ph>
|
||||
</message>
|
||||
<message name="IDS_DATA_REDUCTION_PROMO_LEARN_MORE_URL" desc="URL for Lite mode help center article" translateable="false">
|
||||
|
@ -8252,7 +8252,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_DATA_REDUCTION_ENABLE_BUTTON_LITE_MODE" desc="Button the user presses if they want to enable Lite mode" >
|
||||
Turn on Lite mode
|
||||
@@ -1680,10 +1680,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1686,10 +1686,10 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Waiting for details of parents.
|
||||
</message>
|
||||
<message name="IDS_ACCOUNT_MANAGEMENT_ONE_PARENT_NAME" desc="String for name of single parent for child account.">
|
||||
|
@ -8265,7 +8265,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_ACCOUNT_MANAGEMENT_CHILD_CONTENT_TITLE" desc="Title of the Content setting, which controls which websites a child is allowed to visit.">
|
||||
Content
|
||||
@@ -1742,22 +1742,22 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1748,22 +1748,22 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Google Terms of Service
|
||||
</message>
|
||||
<message name="IDS_GOOGLE_TERMS_OF_SERVICE_URL" desc="URL for Google terms of service" translateable="false">
|
||||
|
@ -8292,7 +8292,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
|
||||
<!-- Sign-in strings -->
|
||||
@@ -1774,7 +1774,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1780,7 +1780,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Also clear your Chrome data from this device
|
||||
</message>
|
||||
<message name="IDS_SIGNOUT_MANAGED_ACCOUNT_MESSAGE" desc="Message to display for sign out of Chrome dialog when the account has enterprise management, and all user data will be erased">
|
||||
|
@ -8301,7 +8301,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_SIGN_IN_GETTING_ACCOUNT_MANAGEMENT_POLICY" desc="Title of progress bar dialog for getting management policy">
|
||||
Contacting Google. This may take a minute…
|
||||
@@ -1879,7 +1879,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1885,7 +1885,7 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Your data was encrypted with your <ph name="BEGIN_LINK"><learnmore></ph>sync passphrase<ph name="END_LINK"></learnmore></ph> on <ph name="TIME">%1$s<ex>Sept 1, 2012</ex></ph>. Enter it to start sync.
|
||||
</message>
|
||||
<message name="IDS_SYNC_ACCOUNT_INFO" desc="The message that appears in the options dialog indicating that the user is signed in with the given email address.">
|
||||
|
@ -8310,7 +8310,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_SYNC_PASSPHRASE_CANNOT_BE_BLANK" desc="Inform user that they cannot use a blank password [CHAR_LIMIT=40]">
|
||||
This field cannot be blank
|
||||
@@ -3921,7 +3921,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3927,7 +3927,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
|
||||
<!-- WebUsb Picker UI strings -->
|
||||
<message name="IDS_USB_CHOOSER_DIALOG_PROMPT" desc="The text that is used to introduce the USB chooser dialog to the user.">
|
||||
|
@ -8319,7 +8319,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_USB_CHOOSER_DIALOG_NO_DEVICES_FOUND_PROMPT" desc="The label shown to the user to inform them that no USB devices were found matching the requirements that the application provided.">
|
||||
No compatible devices found
|
||||
@@ -3955,7 +3955,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3961,7 +3961,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Running in Chrome
|
||||
</message>
|
||||
<message name="IDS_TWA_RUNNING_IN_CHROME_V2" desc="Updated message on a snackbar indicating that the current Activity may use Chrome data (the rest of the app may not be).">
|
||||
|
@ -8328,7 +8328,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
</message>
|
||||
<message name="IDS_GOT_IT" desc="Button for the user to accept a disclosure/message">
|
||||
Got it
|
||||
@@ -4315,7 +4315,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4321,7 +4321,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Sending to <ph name="device_name">%1$s<ex>Tanya's Pixel 2</ex></ph>...
|
||||
</message>
|
||||
<message name="IDS_SEND_TAB_TO_SELF_NOTIFICATION_CONTEXT_TEXT" desc="Text displayed as the second line of a notification indicating the domain and the device the tab is shared from.">
|
||||
|
|
|
@ -902,7 +902,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -1657,6 +1657,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
@@ -1663,6 +1663,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_DEPRECATION_WARNING" desc="Warning about Chrome updates no longer being supported">
|
||||
Chrome updates are no longer supported for this version of Android
|
||||
</message>
|
||||
|
@ -915,7 +915,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
|||
|
||||
<!-- Account management UI strings. -->
|
||||
<message name="IDS_ACCOUNT_MANAGEMENT_TITLE" desc="Header title for the account management screen. [CHAR_LIMIT=32]">
|
||||
@@ -3144,7 +3150,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3150,7 +3156,7 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
|
||||
<!-- Main menu items -->
|
||||
<message name="IDS_MENU_UPDATE" desc="Menu item for updating chrome. [CHAR_LIMIT=24]">
|
||||
|
|
|
@ -389,7 +389,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
|
|||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4453,6 +4453,19 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4459,6 +4459,19 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Send text to Your Devices
|
||||
</message>
|
||||
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 4 Oct 2021 11:48:18 +0000
|
||||
Subject: Force open external links in incognito
|
||||
|
||||
---
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/LaunchIntentDispatcher.java | 11 +++++++++++
|
||||
.../ui/android/strings/android_chrome_strings.grd | 8 ++++++++
|
||||
3 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -61,6 +61,11 @@
|
||||
android:title="@string/allow_custom_tab_intents_title"
|
||||
android:summary="@string/allow_custom_tab_intents_summary"
|
||||
android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="open_external_links_incognito"
|
||||
+ android:title="@string/open_external_links_incognito_title"
|
||||
+ android:summary="@string/open_external_links_incognito_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:key="privacy_sandbox"
|
||||
android:title="@string/prefs_privacy_sandbox"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
@@ -421,6 +421,17 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
|
||||
if (Intent.ACTION_VIEW.equals(newIntent.getAction())
|
||||
&& !IntentHandler.wasIntentSenderChrome(newIntent)) {
|
||||
+
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
+ "open_external_links_incognito", false)) {
|
||||
+ Context applicationContext = ContextUtils.getApplicationContext();
|
||||
+ newIntent = IntentHandler.createTrustedOpenNewTabIntent(applicationContext,
|
||||
+ /*incognito*/true);
|
||||
+ newIntent.setData(mIntent.getData());
|
||||
+ newIntent.setPackage(applicationContext.getPackageName());
|
||||
+ newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
+ }
|
||||
+
|
||||
long time = SystemClock.elapsedRealtime();
|
||||
if (!chromeTabbedTaskExists()) {
|
||||
newIntent.putExtra(IntentHandler.EXTRA_STARTED_TABBED_CHROME_TASK, true);
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4498,6 +4498,14 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Allow applications to open custom tab intents, similar to webview.
|
||||
</message>
|
||||
|
||||
+ <!-- Open External Links in Incognito -->
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_TITLE" desc="Text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Open external links in incognito
|
||||
+ </message>
|
||||
+ <message name="IDS_OPEN_EXTERNAL_LINKS_INCOGNITO_SUMMARY" desc="Summary text for 'Open external links in incognito' settings-privacy option.">
|
||||
+ Force the opening of all external links in incognito mode
|
||||
+ </message>
|
||||
+
|
||||
<!-- Autofill Assistant preferences -->
|
||||
<!-- TODO(b/168178344): Move to Assistant settings strings section below. -->
|
||||
<message name="IDS_PREFS_AUTOFILL_ASSISTANT_TITLE" desc="Title for the Autofill Assistant preferences screen. [CHAR_LIMIT=32]">
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -36,15 +36,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
import android.os.Build;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
@@ -67,6 +68,7 @@ public class PrivacySettings
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
@@ -71,6 +72,7 @@ public class PrivacySettings
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
+ private static final String PREF_FORCE_NO_JIT = "force_no_jit";
|
||||
|
||||
// moved from SyncAndServicesSettings.java
|
||||
private static final String PREF_SERVICES_CATEGORY = "services_category";
|
||||
@@ -176,6 +178,10 @@ public class PrivacySettings
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
|
||||
@@ -201,6 +203,10 @@ public class PrivacySettings
|
||||
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
|
||||
prefService.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
|
||||
|
@ -55,7 +55,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
} else if (PREF_AUTOFILL_ASSISTANT.equals(key)) {
|
||||
mSharedPreferencesManager.writeBoolean(
|
||||
ChromePreferenceKeys.AUTOFILL_ASSISTANT_ENABLED, (boolean) newValue);
|
||||
@@ -259,6 +265,12 @@ public class PrivacySettings
|
||||
@@ -280,6 +286,12 @@ public class PrivacySettings
|
||||
historyInIncognitoPref.setChecked(
|
||||
prefService.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED));
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ Search suggestions, autofill assistant and contextual search
|
|||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -60,4 +60,24 @@
|
||||
@@ -55,4 +55,24 @@
|
||||
android:key="privacy_sandbox"
|
||||
android:title="@string/prefs_privacy_sandbox"
|
||||
android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"/>
|
||||
|
@ -40,17 +40,17 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
|||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -19,6 +19,7 @@ import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
import org.chromium.base.ContextUtils;
|
||||
@@ -20,6 +20,7 @@ import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.BuildInfo;
|
||||
import org.chromium.base.Log;
|
||||
import org.chromium.chrome.R;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.preferences.Pref;
|
||||
@@ -42,6 +43,13 @@ import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
import org.chromium.base.Log;
|
||||
@@ -45,6 +46,13 @@ import org.chromium.components.user_prefs.UserPrefs;
|
||||
import org.chromium.ui.text.NoUnderlineClickableSpan;
|
||||
import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
+import androidx.annotation.Nullable;
|
||||
+import androidx.preference.PreferenceCategory;
|
||||
|
@ -62,9 +62,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
/**
|
||||
* Fragment to keep track of the all the privacy related preferences.
|
||||
*/
|
||||
@@ -60,6 +68,18 @@ public class PrivacySettings
|
||||
private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
@@ -66,6 +74,18 @@ public class PrivacySettings
|
||||
|
||||
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
|
||||
+ // moved from SyncAndServicesSettings.java
|
||||
+ private static final String PREF_SERVICES_CATEGORY = "services_category";
|
||||
|
@ -81,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
|
||||
@Override
|
||||
@@ -90,6 +110,29 @@ public class PrivacySettings
|
||||
@@ -96,6 +116,29 @@ public class PrivacySettings
|
||||
|
||||
mManagedPreferenceDelegate = createManagedPreferenceDelegate();
|
||||
|
||||
|
@ -111,7 +111,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
ChromeSwitchPreference canMakePaymentPref =
|
||||
(ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT);
|
||||
canMakePaymentPref.setOnPreferenceChangeListener(this);
|
||||
@@ -131,6 +174,11 @@ public class PrivacySettings
|
||||
@@ -156,6 +199,11 @@ public class PrivacySettings
|
||||
} else if (PREF_CAN_MAKE_PAYMENT.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
|
@ -123,9 +123,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
|
||||
PrivacyPreferencesManagerImpl.getInstance().setNetworkPredictionEnabled(
|
||||
(boolean) newValue);
|
||||
@@ -149,6 +197,16 @@ public class PrivacySettings
|
||||
return true;
|
||||
}
|
||||
@@ -175,6 +223,16 @@ public class PrivacySettings
|
||||
|
||||
public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
|
||||
|
||||
+ /**
|
||||
+ * This checks whether Autofill Assistant is enabled and was shown at least once (only then
|
||||
|
@ -140,7 +140,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
|||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
@@ -159,7 +217,7 @@ public class PrivacySettings
|
||||
@@ -185,7 +243,7 @@ public class PrivacySettings
|
||||
* Updates the summaries for several preferences.
|
||||
*/
|
||||
public void updateSummaries() {
|
||||
|
|
Loading…
Add table
Reference in a new issue