Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1c1ce61ff | ||
|
|
525243125d | ||
|
|
c15c433631 | ||
|
|
e7e7afdc2d | ||
|
|
a600d36a56 | ||
|
|
e012e0aa9f | ||
|
|
a320e83fa1 |
@@ -1,3 +1,23 @@
|
||||
# 73.0.3683.97
|
||||
* remove patch to hide NTP tiles
|
||||
|
||||
# 73.0.3683.88
|
||||
* add option to use home page as NTP
|
||||
|
||||
# 73.0.3683.82
|
||||
* remove force home page button flag
|
||||
* enable site per process isolation for devices with memory > 1GB
|
||||
* use 64-bit processes for SystemWebView
|
||||
* disable local field trials seed (redundant)
|
||||
* fix patch for classic new tab page (redundant)
|
||||
|
||||
# 73.0.3683.79
|
||||
* add missing Qwant engine from default engines list (fixes https://github.com/bromite/bromite/issues/262)
|
||||
* DoH: include upstream patch for DNS secure mode
|
||||
* DoH: enable DNS secure mode by default
|
||||
|
||||
# 73.0.3683.70
|
||||
|
||||
# 73.0.3683.61
|
||||
* drop patches with functionality now available from upstream (DuckDuckGo and Qwant search engines, TLS 1.3 final)
|
||||
* add only DuckDuckGo Lite search engine
|
||||
|
||||
@@ -86,6 +86,7 @@ Yes, since version 69. While the desktop version of Chromium has an option to di
|
||||
* anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs
|
||||
* use fixed User-Agent to conceal real model and browser version
|
||||
* privacy enhancement patches from [Iridium](https://iridiumbrowser.de/), [Inox patchset](https://github.com/gcarq/inox-patchset), [Brave](https://brave.com/) and [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) projects
|
||||
* security enhancement patches from [AndroidHardening](https://github.com/AndroidHardening) project
|
||||
|
||||
## Features not related to privacy
|
||||
* import/export bookmarks
|
||||
@@ -145,6 +146,7 @@ The patches are to be applied second the order specified in the `patches_list.tx
|
||||
* [Chromium project](https://www.chromium.org/Home) and developers
|
||||
* [Iridium project](https://github.com/iridium-browser) for some patches
|
||||
* [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) for some patches
|
||||
* [AndroidHardening](https://github.com/AndroidHardening) for some patches
|
||||
* [Inox patchset](https://github.com/gcarq/inox-patchset) for some patches (via ungoogled-chromium)
|
||||
* [Brave Browser](https://github.com/brave/browser-android-tabs) for some patches
|
||||
* nochromo for the original adblock patch
|
||||
|
||||
+1611
-564
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
#endif // OS_ANDROID
|
||||
|
||||
const FeatureEntry::Choice kMHTMLGeneratorOptionChoices[] = {
|
||||
@@ -3436,6 +3444,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3433,6 +3441,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kAsyncDns)},
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
// Ensure that all effective connection types returned by Network Quality
|
||||
// Estimator (NQE) are also exposed via flags.
|
||||
static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
|
||||
@@ -2360,6 +2365,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2357,6 +2362,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kMaterialDesignIncognitoNTPName,
|
||||
flag_descriptions::kMaterialDesignIncognitoNTPDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(features::kMaterialDesignIncognitoNTP)},
|
||||
|
||||
@@ -13,7 +13,7 @@ Disable it by default on Android as it is everywhere else
|
||||
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
|
||||
@@ -3950,6 +3950,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3947,6 +3947,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kSiteCharacteristicsDatabase)},
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Subject: Add flag to disable IPv6 probes
|
||||
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
|
||||
@@ -3272,6 +3272,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3269,6 +3269,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kHandwritingGesture)},
|
||||
#endif // OS_CHROMEOS
|
||||
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 9 Jul 2018 20:12:19 +0200
|
||||
Subject: Add flag to show/hide NTP tiles
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/android/ntp/most_visited_sites_bridge.cc | 8 ++++++++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
chrome/common/chrome_switches.cc | 3 +++
|
||||
chrome/common/chrome_switches.h | 1 +
|
||||
6 files changed, 23 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
|
||||
@@ -1866,6 +1866,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
|
||||
#endif // OS_MACOSX
|
||||
#if defined(OS_ANDROID)
|
||||
+ {"hide-ntp-tiles",
|
||||
+ flag_descriptions::kHideNTPTilesName,
|
||||
+ flag_descriptions::kHideNTPTilesDescription, kOsAndroid,
|
||||
+ SINGLE_VALUE_TYPE(switches::kHideNTPTiles)},
|
||||
{"disable-pull-to-refresh-effect",
|
||||
flag_descriptions::kPullToRefreshEffectName,
|
||||
flag_descriptions::kPullToRefreshEffectDescription, kOsAndroid,
|
||||
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
@@ -13,9 +13,11 @@
|
||||
#include "base/android/jni_array.h"
|
||||
#include "base/android/jni_string.h"
|
||||
#include "base/android/scoped_java_ref.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
+#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/browser/history/history_service_factory.h"
|
||||
#include "chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -161,6 +163,10 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
|
||||
std::vector<int> sources;
|
||||
std::vector<int> section_types;
|
||||
std::vector<int64_t> data_generation_times;
|
||||
+
|
||||
+ // do not source any tile if NTP is disabled
|
||||
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ switches::kHideNTPTiles)) {
|
||||
for (const auto& section : sections) {
|
||||
const NTPTilesVector& tiles = section.second;
|
||||
section_types.resize(section_types.size() + tiles.size(),
|
||||
@@ -175,6 +181,8 @@ void MostVisitedSitesBridge::JavaObserver::OnURLsAvailable(
|
||||
tile.data_generation_time.ToJavaTime());
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+
|
||||
Java_MostVisitedSitesBridge_onURLsAvailable(
|
||||
env, observer_, ToJavaArrayOfStrings(env, titles),
|
||||
ToJavaArrayOfStrings(env, urls), ToJavaIntArray(env, section_types),
|
||||
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
|
||||
@@ -189,6 +189,10 @@ const char kAwaitOptimizationName[] = "Await optimization";
|
||||
const char kAwaitOptimizationDescription[] =
|
||||
"Enables await taking 1 tick on the microtask queue.";
|
||||
|
||||
+const char kHideNTPTilesName[] = "Hide NTP tiles";
|
||||
+const char kHideNTPTilesDescription[] =
|
||||
+ "Hide all tiles on the New Tab Page, making it effectively empty all the time.";
|
||||
+
|
||||
const char kBleAdvertisingInExtensionsName[] = "BLE Advertising in Chrome Apps";
|
||||
const char kBleAdvertisingInExtensionsDescription[] =
|
||||
"Enables BLE Advertising in Chrome Apps. BLE Advertising might interfere "
|
||||
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
|
||||
@@ -143,6 +143,9 @@ extern const char kAutoplayPolicyDocumentUserActivation[];
|
||||
extern const char kAwaitOptimizationName[];
|
||||
extern const char kAwaitOptimizationDescription[];
|
||||
|
||||
+extern const char kHideNTPTilesName[];
|
||||
+extern const char kHideNTPTilesDescription[];
|
||||
+
|
||||
extern const char kBleAdvertisingInExtensionsName[];
|
||||
extern const char kBleAdvertisingInExtensionsDescription[];
|
||||
|
||||
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
|
||||
--- a/chrome/common/chrome_switches.cc
|
||||
+++ b/chrome/common/chrome_switches.cc
|
||||
@@ -88,6 +88,9 @@ const char kAutoSelectDesktopCaptureSource[] =
|
||||
const char kBypassAppBannerEngagementChecks[] =
|
||||
"bypass-app-banner-engagement-checks";
|
||||
|
||||
+// Hide all New Tab Page tiles, making it effectively empty all the time.
|
||||
+const char kHideNTPTiles[] = "hide-ntp-tiles";
|
||||
+
|
||||
// How often (in seconds) to check for updates. Should only be used for testing
|
||||
// purposes.
|
||||
const char kCheckForUpdateIntervalSec[] = "check-for-update-interval";
|
||||
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
|
||||
--- a/chrome/common/chrome_switches.h
|
||||
+++ b/chrome/common/chrome_switches.h
|
||||
@@ -46,6 +46,7 @@ extern const char kAuthServerWhitelist[];
|
||||
extern const char kAutoOpenDevToolsForTabs[];
|
||||
extern const char kAutoSelectDesktopCaptureSource[];
|
||||
extern const char kBypassAppBannerEngagementChecks[];
|
||||
+extern const char kHideNTPTiles[];
|
||||
extern const char kCheckForUpdateIntervalSec[];
|
||||
extern const char kCipherSuiteBlacklist[];
|
||||
extern const char kCloudPrintFile[];
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -20,7 +20,7 @@ legacy acceleration events.
|
||||
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
|
||||
@@ -2773,6 +2773,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2770,6 +2770,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
|
||||
flag_descriptions::kEnableGenericSensorDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kGenericSensor)},
|
||||
@@ -83,7 +83,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
|
||||
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
||||
--- a/content/public/common/content_features.cc
|
||||
+++ b/content/public/common/content_features.cc
|
||||
@@ -600,6 +600,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
|
||||
@@ -596,6 +596,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
|
||||
// https://wicg.github.io/webusb
|
||||
const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 18 Mar 2019 21:47:12 +0100
|
||||
Subject: Add option to use home page as NTP
|
||||
|
||||
Use about:blank as default homepage
|
||||
---
|
||||
.../android/java/res/xml/homepage_preferences.xml | 5 +++++
|
||||
.../partnercustomizations/HomepageManager.java | 24 ++++++++++++++++++++--
|
||||
.../browser/preferences/HomepagePreferences.java | 14 ++++++++++++-
|
||||
.../chrome/browser/tabmodel/TabCreatorManager.java | 11 ++++++++--
|
||||
.../java/strings/android_chrome_strings.grd | 3 +++
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 2 ++
|
||||
chrome/common/pref_names.cc | 4 ++++
|
||||
chrome/common/pref_names.h | 1 +
|
||||
8 files changed, 59 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
@@ -16,4 +16,9 @@
|
||||
android:title="@string/options_homepage_edit_label"
|
||||
android:fragment="org.chromium.chrome.browser.preferences.HomepageEditor" />
|
||||
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
|
||||
+ android:key="ntp_is_homepage_switch"
|
||||
+ android:summaryOn="@string/options_ntp_is_homepage_label"
|
||||
+ android:summaryOff="@string/options_ntp_is_homepage_label" />
|
||||
+
|
||||
</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
@@ -32,6 +32,7 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
private static final String PREF_HOMEPAGE_ENABLED = "homepage";
|
||||
+ public static final String PREF_NTP_IS_HOMEPAGE = "newtabpage_is_homepage";
|
||||
private static final String PREF_HOMEPAGE_CUSTOM_URI = "homepage_custom_uri";
|
||||
private static final String PREF_HOMEPAGE_USE_DEFAULT_URI = "homepage_partner_enabled";
|
||||
|
||||
@@ -91,7 +92,8 @@ public class HomepageManager {
|
||||
*/
|
||||
public static boolean shouldCloseAppWithZeroTabs() {
|
||||
return HomepageManager.isHomepageEnabled()
|
||||
- && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri());
|
||||
+ && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri())
|
||||
+ && (HomepageManager.getHomepageUri() != UrlConstants.CHROME_BLANK_URL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +113,7 @@ public class HomepageManager {
|
||||
* @return The default homepage URI.
|
||||
*/
|
||||
public static String getDefaultHomepageUri() {
|
||||
- return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
+ return UrlConstants.CHROME_BLANK_URL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,6 +127,14 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Returns the user preference for whether the New Tab Page is the homepage or not.
|
||||
+ *
|
||||
+ */
|
||||
+ public boolean getPrefNTPIsHomepageEnabled() {
|
||||
+ return mSharedPreferences.getBoolean(PREF_NTP_IS_HOMEPAGE, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* Sets the user preference for whether the homepage is enabled.
|
||||
*/
|
||||
public void setPrefHomepageEnabled(boolean enabled) {
|
||||
@@ -138,6 +148,16 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Sets the user preference for whether the new tab page is the homepage or not.
|
||||
+ */
|
||||
+ public void setPrefNTPIsHomepageEnabled(boolean enabled) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_NTP_IS_HOMEPAGE, enabled);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+ notifyHomepageUpdated();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* @return User specified homepage custom URI string.
|
||||
*/
|
||||
public String getPrefHomepageCustomUri() {
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
@@ -19,9 +19,10 @@ import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
public class HomepagePreferences extends PreferenceFragment {
|
||||
private static final String PREF_HOMEPAGE_SWITCH = "homepage_switch";
|
||||
private static final String PREF_HOMEPAGE_EDIT = "homepage_edit";
|
||||
+ private static final String PREF_NTP_HOMEPAGE_SWITCH = "ntp_is_homepage_switch";
|
||||
|
||||
private HomepageManager mHomepageManager;
|
||||
- private ChromeSwitchPreference mHomepageSwitch;
|
||||
+ private ChromeSwitchPreference mHomepageSwitch, mNTPIsHomepageSwitch;
|
||||
private Preference mHomepageEdit;
|
||||
|
||||
@Override
|
||||
@@ -47,6 +48,17 @@ public class HomepagePreferences extends PreferenceFragment {
|
||||
}
|
||||
});
|
||||
|
||||
+ mNTPIsHomepageSwitch = (ChromeSwitchPreference) findPreference(PREF_NTP_HOMEPAGE_SWITCH);
|
||||
+ boolean isHomepageNTPEnabled = mHomepageManager.getPrefNTPIsHomepageEnabled();
|
||||
+ mNTPIsHomepageSwitch.setChecked(isHomepageNTPEnabled);
|
||||
+ mNTPIsHomepageSwitch.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||
+ @Override
|
||||
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
+ mHomepageManager.setPrefNTPIsHomepageEnabled((boolean) newValue);
|
||||
+ return true;
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
mHomepageEdit = findPreference(PREF_HOMEPAGE_EDIT);
|
||||
updateCurrentHomepageUrl();
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
@@ -10,6 +10,7 @@ import org.chromium.base.TraceEvent;
|
||||
import org.chromium.chrome.browser.UrlConstants;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
import org.chromium.chrome.browser.tab.TabState;
|
||||
+import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
|
||||
import org.chromium.content_public.browser.LoadUrlParams;
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
|
||||
@@ -88,12 +89,18 @@ public interface TabCreatorManager {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Creates a new tab and loads the NTP.
|
||||
+ * Creates a new tab and loads the NTP or the homepage, depending on user preferences.
|
||||
*/
|
||||
public final void launchNTP() {
|
||||
try {
|
||||
+ String newTabURL;
|
||||
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
|
||||
+ newTabURL = HomepageManager.getHomepageUri();
|
||||
+ } else {
|
||||
+ newTabURL = UrlConstants.NTP_URL;
|
||||
+ }
|
||||
TraceEvent.begin("TabCreator.launchNTP");
|
||||
- launchUrl(UrlConstants.NTP_URL, TabLaunchType.FROM_CHROME_UI);
|
||||
+ launchUrl(newTabURL, TabLaunchType.FROM_CHROME_UI);
|
||||
} finally {
|
||||
TraceEvent.end("TabCreator.launchNTP");
|
||||
}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -637,6 +637,9 @@ CHAR-LIMIT guidelines:
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is opened when they tap on the home page button in the omnibox.">
|
||||
Open this page
|
||||
</message>
|
||||
+ <message name="IDS_OPTIONS_NTP_IS_HOMEPAGE_LABEL" desc="The label for switch that allows the user to toggle whether opening a new tab leads to the new tab page or the home page.">
|
||||
+ Use for new tabs
|
||||
+ </message>
|
||||
|
||||
<!-- Startup page preferences -->
|
||||
<message name="IDS_OPTIONS_STARTUP_PAGE_TITLE" desc="The title of the setting that allows users to manage the page that opens when they start Chrome.">
|
||||
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -56,6 +56,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
|
||||
GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
+ registry->RegisterBooleanPref(prefs::kNewTabPageIsHomePage, false,
|
||||
+ GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
|
||||
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
|
||||
bool reset_check_default = false;
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -57,6 +57,10 @@ const char kForceEphemeralProfiles[] = "profile.ephemeral_mode";
|
||||
// A boolean specifying whether the New Tab page is the home page or not.
|
||||
const char kHomePageIsNewTabPage[] = "homepage_is_newtabpage";
|
||||
|
||||
+// A boolean specifying whether opening a new tab should open the Home page
|
||||
+// instead of the New Tab page.
|
||||
+const char kNewTabPageIsHomePage[] = "newtabpage_is_homepage";
|
||||
+
|
||||
// This is the URL of the page to load when opening new tabs.
|
||||
const char kHomePage[] = "homepage";
|
||||
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -292,6 +292,7 @@ extern const char kMostRecentlyUsedNetworkFileShareURL[];
|
||||
extern const char kParentAccessCodeConfig[];
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
extern const char kShowHomeButton[];
|
||||
+extern const char kNewTabPageIsHomePage[];
|
||||
extern const char kSpeechRecognitionFilterProfanities[];
|
||||
extern const char kAllowDeletingBrowserHistory[];
|
||||
#if !defined(OS_ANDROID)
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -228,7 +228,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/download/public/common/download_interrupt_reasons.h"
|
||||
#include "components/download/public/common/download_item.h"
|
||||
@@ -94,8 +98,10 @@
|
||||
@@ -101,8 +105,10 @@
|
||||
using content::BrowserThread;
|
||||
using download::DownloadItem;
|
||||
using content::DownloadManager;
|
||||
@@ -239,7 +239,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -744,19 +750,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
|
||||
@@ -764,19 +770,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
|
||||
return std::string(chrome::kApplicationClientIDStringForAVScanning);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
|
||||
|
||||
void ChromeDownloadManagerDelegate::NotifyExtensions(
|
||||
DownloadItem* download,
|
||||
@@ -1199,13 +1205,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
|
||||
@@ -1219,13 +1225,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
|
||||
DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 17 Mar 2019 20:51:11 +0100
|
||||
Subject: Always show home page settings
|
||||
|
||||
Remove the "Force Enable Home Page Button" flag, which was bugged, and always
|
||||
display home page settings.
|
||||
This allows removing the home page button and restoring it from settings.
|
||||
---
|
||||
.../browser/init/ProcessInitializationHandler.java | 12 --------
|
||||
.../partnercustomizations/HomepageManager.java | 17 ++--------
|
||||
.../preferences/ChromePreferenceManager.java | 7 -----
|
||||
.../browser/preferences/MainPreferences.java | 12 +++-----
|
||||
.../chrome/browser/util/FeatureUtilities.java | 36 ----------------------
|
||||
chrome/browser/about_flags.cc | 3 --
|
||||
chrome/browser/android/chrome_feature_list.cc | 4 ---
|
||||
chrome/browser/android/chrome_feature_list.h | 1 -
|
||||
8 files changed, 7 insertions(+), 85 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
|
||||
@@ -328,18 +328,6 @@ public class ProcessInitializationHandler {
|
||||
deferredStartupHandler.addDeferredTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
- if (HomepageManager.shouldShowHomepageSetting()) {
|
||||
- RecordHistogram.recordBooleanHistogram("Settings.ShowHomeButtonPreferenceState",
|
||||
- HomepageManager.isHomepageEnabled());
|
||||
- RecordHistogram.recordBooleanHistogram("Settings.HomePageIsCustomized",
|
||||
- !HomepageManager.getInstance().getPrefHomepageUseDefaultUri());
|
||||
- }
|
||||
- }
|
||||
- });
|
||||
-
|
||||
- deferredStartupHandler.addDeferredTask(new Runnable() {
|
||||
- @Override
|
||||
- public void run() {
|
||||
// Starts syncing with GSA.
|
||||
AppHooks.get().createGsaHelper().startSync();
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
@@ -83,10 +83,7 @@ public class HomepageManager {
|
||||
* @return Whether or not homepage is enabled.
|
||||
*/
|
||||
public static boolean isHomepageEnabled() {
|
||||
- if (FeatureUtilities.isHomePageButtonForceEnabled()) {
|
||||
- return getInstance().getPrefHomepageEnabled();
|
||||
- }
|
||||
- return false;
|
||||
+ return getInstance().getPrefHomepageEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,13 +95,6 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
/**
|
||||
- * @return Whether or not homepage setting should be shown.
|
||||
- */
|
||||
- public static boolean shouldShowHomepageSetting() {
|
||||
- return FeatureUtilities.isHomePageButtonForceEnabled();
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
* @return Homepage URI string, if it's enabled. Null otherwise or uninitialized.
|
||||
*/
|
||||
public static String getHomepageUri() {
|
||||
@@ -118,8 +108,7 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
/**
|
||||
- * @return The default homepage URI if the homepage is partner provided or the new tab page
|
||||
- * if the homepage button is force enabled via flag.
|
||||
+ * @return The default homepage URI.
|
||||
*/
|
||||
public static String getDefaultHomepageUri() {
|
||||
return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
@@ -132,7 +121,7 @@ public class HomepageManager {
|
||||
* @see #isHomepageEnabled
|
||||
*/
|
||||
public boolean getPrefHomepageEnabled() {
|
||||
- return mSharedPreferences.getBoolean(PREF_HOMEPAGE_ENABLED, true);
|
||||
+ return mSharedPreferences.getBoolean(PREF_HOMEPAGE_ENABLED, false);
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
|
||||
@@ -144,13 +144,6 @@ public class ChromePreferenceManager {
|
||||
private static final String CHROME_MODERN_DESIGN_ENABLED_KEY = "chrome_modern_design_enabled";
|
||||
|
||||
/**
|
||||
- * Whether or not the home page button is force enabled.
|
||||
- * Default value is false.
|
||||
- */
|
||||
- public static final String HOME_PAGE_BUTTON_FORCE_ENABLED_KEY =
|
||||
- "home_page_button_force_enabled";
|
||||
-
|
||||
- /**
|
||||
* Whether or not the homepage tile will be shown.
|
||||
* Default value is false.
|
||||
*/
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
|
||||
@@ -195,15 +195,11 @@ public class MainPreferences extends PreferenceFragment
|
||||
|
||||
updateSearchEnginePreference();
|
||||
|
||||
- if (HomepageManager.shouldShowHomepageSetting()) {
|
||||
- Preference homepagePref = addPreferenceIfAbsent(PREF_HOMEPAGE);
|
||||
- if (FeatureUtilities.isNewTabPageButtonEnabled()) {
|
||||
- homepagePref.setTitle(R.string.options_startup_page_title);
|
||||
- }
|
||||
- setOnOffSummary(homepagePref, HomepageManager.getInstance().getPrefHomepageEnabled());
|
||||
- } else {
|
||||
- removePreferenceIfPresent(PREF_HOMEPAGE);
|
||||
+ Preference homepagePref = addPreferenceIfAbsent(PREF_HOMEPAGE);
|
||||
+ if (FeatureUtilities.isNewTabPageButtonEnabled()) {
|
||||
+ homepagePref.setTitle(R.string.options_startup_page_title);
|
||||
}
|
||||
+ setOnOffSummary(homepagePref, HomepageManager.getInstance().getPrefHomepageEnabled());
|
||||
|
||||
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.UNIFIED_CONSENT)
|
||||
&& FeatureUtilities.areContextualSuggestionsEnabled(getActivity())
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
@@ -71,7 +71,6 @@ public class FeatureUtilities {
|
||||
private static Boolean sHasRecognitionIntentHandler;
|
||||
|
||||
private static Boolean sIsSoleEnabled;
|
||||
- private static Boolean sIsHomePageButtonForceEnabled;
|
||||
private static Boolean sIsHomepageTileEnabled;
|
||||
private static Boolean sIsNewTabPageButtonEnabled;
|
||||
private static Boolean sIsBottomToolbarEnabled;
|
||||
@@ -186,7 +185,6 @@ public class FeatureUtilities {
|
||||
cacheSoleEnabled();
|
||||
cacheCommandLineOnNonRootedEnabled();
|
||||
FirstRunUtils.cacheFirstRunPrefs();
|
||||
- cacheHomePageButtonForceEnabled();
|
||||
cacheHomepageTileEnabled();
|
||||
cacheNewTabPageButtonEnabled();
|
||||
cacheBottomToolbarEnabled();
|
||||
@@ -212,40 +210,6 @@ public class FeatureUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Cache whether or not the home page button is force enabled so on next startup, the value can
|
||||
- * be made available immediately.
|
||||
- */
|
||||
- public static void cacheHomePageButtonForceEnabled() {
|
||||
- if (PartnerBrowserCustomizations.isHomepageProviderAvailableAndEnabled()) return;
|
||||
- ChromePreferenceManager.getInstance().writeBoolean(
|
||||
- ChromePreferenceManager.HOME_PAGE_BUTTON_FORCE_ENABLED_KEY,
|
||||
- ChromeFeatureList.isEnabled(ChromeFeatureList.HOME_PAGE_BUTTON_FORCE_ENABLED));
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * @return Whether or not the home page button is force enabled.
|
||||
- */
|
||||
- public static boolean isHomePageButtonForceEnabled() {
|
||||
- if (sIsHomePageButtonForceEnabled == null) {
|
||||
- ChromePreferenceManager prefManager = ChromePreferenceManager.getInstance();
|
||||
-
|
||||
- try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
|
||||
- sIsHomePageButtonForceEnabled = prefManager.readBoolean(
|
||||
- ChromePreferenceManager.HOME_PAGE_BUTTON_FORCE_ENABLED_KEY, false);
|
||||
- }
|
||||
- }
|
||||
- return sIsHomePageButtonForceEnabled;
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Resets whether the home page button is enabled for tests. After this is called, the next
|
||||
- * call to #isHomePageButtonForceEnabled() will retrieve the value from shared preferences.
|
||||
- */
|
||||
- public static void resetHomePageButtonForceEnabledForTests() {
|
||||
- sIsHomePageButtonForceEnabled = null;
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
* Cache whether or not the toolbar should be inflated on a background thread so on next
|
||||
* startup, the value can be made available immediately.
|
||||
*/
|
||||
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
|
||||
@@ -1891,9 +1891,6 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-chrome-duet", flag_descriptions::kChromeDuetName,
|
||||
flag_descriptions::kChromeDuetDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(chrome::android::kChromeDuetFeature)},
|
||||
- {"force-enable-home-page-button", flag_descriptions::kHomePageButtonName,
|
||||
- flag_descriptions::kHomePageButtonDescription, kOsAndroid,
|
||||
- FEATURE_VALUE_TYPE(chrome::android::kHomePageButtonForceEnabled)},
|
||||
{"enable-ntp-button", flag_descriptions::kNtpButtonName,
|
||||
flag_descriptions::kNtpButtonDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(chrome::android::kNTPButton)},
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -124,7 +124,6 @@ const base::Feature* kFeaturesExposedToJava[] = {
|
||||
&kGestureNavigation,
|
||||
&kHandleMediaIntents,
|
||||
&kHideUserDataFromIncognitoNotifications,
|
||||
- &kHomePageButtonForceEnabled,
|
||||
&kHomepageTile,
|
||||
&kHorizontalTabSwitcherAndroid,
|
||||
&kImprovedA2HS,
|
||||
@@ -337,9 +336,6 @@ const base::Feature kHandleMediaIntents{"HandleMediaIntents",
|
||||
const base::Feature kHideUserDataFromIncognitoNotifications{
|
||||
"HideUserDataFromIncognitoNotifications", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
-const base::Feature kHomePageButtonForceEnabled{
|
||||
- "HomePageButtonForceEnabled", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
-
|
||||
const base::Feature kHomepageTile{"HomepageTile",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.h b/chrome/browser/android/chrome_feature_list.h
|
||||
--- a/chrome/browser/android/chrome_feature_list.h
|
||||
+++ b/chrome/browser/android/chrome_feature_list.h
|
||||
@@ -56,7 +56,6 @@ extern const base::Feature kForegroundNotificationManager;
|
||||
extern const base::Feature kGestureNavigation;
|
||||
extern const base::Feature kHandleMediaIntents;
|
||||
extern const base::Feature kHideUserDataFromIncognitoNotifications;
|
||||
-extern const base::Feature kHomePageButtonForceEnabled;
|
||||
extern const base::Feature kHomepageTile;
|
||||
extern const base::Feature kHorizontalTabSwitcherAndroid;
|
||||
extern const base::Feature kImprovedA2HS;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
+16
-6
@@ -1,16 +1,26 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 27 Jun 2018 11:02:38 +0200
|
||||
Subject: Change default homepage to new tab page
|
||||
Subject: Always use new tab page for default home page
|
||||
|
||||
Disable any partner-provided home page.
|
||||
Ignore any partner-provided home page.
|
||||
---
|
||||
.../chrome/browser/partnercustomizations/HomepageManager.java | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
.../chrome/browser/partnercustomizations/HomepageManager.java | 10 +++-------
|
||||
1 file changed, 3 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
@@ -102,8 +102,7 @@ public class HomepageManager {
|
||||
@@ -83,8 +83,7 @@ public class HomepageManager {
|
||||
* @return Whether or not homepage is enabled.
|
||||
*/
|
||||
public static boolean isHomepageEnabled() {
|
||||
- if (PartnerBrowserCustomizations.isHomepageProviderAvailableAndEnabled()
|
||||
- || FeatureUtilities.isHomePageButtonForceEnabled()) {
|
||||
+ if (FeatureUtilities.isHomePageButtonForceEnabled()) {
|
||||
return getInstance().getPrefHomepageEnabled();
|
||||
}
|
||||
return false;
|
||||
@@ -102,8 +101,7 @@ public class HomepageManager {
|
||||
* @return Whether or not homepage setting should be shown.
|
||||
*/
|
||||
public static boolean shouldShowHomepageSetting() {
|
||||
@@ -20,7 +30,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomiz
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,9 +123,7 @@ public class HomepageManager {
|
||||
@@ -124,9 +122,7 @@ public class HomepageManager {
|
||||
* if the homepage button is force enabled via flag.
|
||||
*/
|
||||
public static String getDefaultHomepageUri() {
|
||||
@@ -36,7 +36,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNu
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -361,7 +361,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
|
||||
@@ -357,7 +357,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kJellyBeanSupported{"JellyBeanSupported",
|
||||
|
||||
@@ -10,7 +10,7 @@ Subject: Disable metrics collection for NTP tiles
|
||||
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
@@ -24,7 +24,6 @@
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "chrome/browser/profiles/profile_android.h"
|
||||
#include "components/favicon_base/favicon_types.h"
|
||||
#include "components/history/core/browser/history_service.h"
|
||||
@@ -18,7 +18,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
#include "components/ntp_tiles/most_visited_sites.h"
|
||||
#include "components/ntp_tiles/section_type.h"
|
||||
#include "components/rappor/rappor_service_impl.h"
|
||||
@@ -46,7 +45,6 @@ using ntp_tiles::NTPTilesVector;
|
||||
@@ -44,7 +43,6 @@ using ntp_tiles::NTPTilesVector;
|
||||
using ntp_tiles::SectionType;
|
||||
using ntp_tiles::TileTitleSource;
|
||||
using ntp_tiles::TileSource;
|
||||
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -247,7 +245,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
|
||||
@@ -239,7 +237,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
|
||||
JNIEnv* env,
|
||||
const JavaParamRef<jobject>& obj,
|
||||
jint jtiles_count) {
|
||||
@@ -34,7 +34,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -260,18 +257,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -252,18 +249,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
jint jsource,
|
||||
jlong jdata_generation_time_ms,
|
||||
const JavaParamRef<jstring>& jurl) {
|
||||
@@ -53,7 +53,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -282,12 +267,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -274,12 +259,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
jint title_source,
|
||||
jint source,
|
||||
jlong jdata_generation_time_ms) {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 25 Dec 2018 16:19:51 -0500
|
||||
Subject: Disable seed-based field trials
|
||||
|
||||
---
|
||||
components/variations/service/variations_field_trial_creator.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc
|
||||
--- a/components/variations/service/variations_field_trial_creator.cc
|
||||
+++ b/components/variations/service/variations_field_trial_creator.cc
|
||||
@@ -513,8 +513,10 @@ bool VariationsFieldTrialCreator::SetupFieldTrials(
|
||||
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
|
||||
bool used_seed = false;
|
||||
if (!used_testing_config) {
|
||||
+#if defined(FIELDTRIAL_SEED_ENABLED)
|
||||
used_seed = CreateTrialsFromSeed(std::move(low_entropy_provider),
|
||||
feature_list.get(), safe_seed_manager);
|
||||
+#endif
|
||||
}
|
||||
|
||||
platform_field_trials->SetupFeatureControllingFieldTrials(used_seed,
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -181,8 +181,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
|
||||
-
|
||||
updateSearchEnginePreference();
|
||||
|
||||
if (HomepageManager.shouldShowHomepageSetting()) {
|
||||
@@ -220,10 +208,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
Preference homepagePref = addPreferenceIfAbsent(PREF_HOMEPAGE);
|
||||
@@ -216,10 +204,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
} else {
|
||||
removePreferenceIfPresent(PREF_DEVELOPER);
|
||||
}
|
||||
@@ -193,7 +193,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
|
||||
}
|
||||
|
||||
private Preference addPreferenceIfAbsent(String key) {
|
||||
@@ -283,11 +267,11 @@ public class MainPreferences extends PreferenceFragment
|
||||
@@ -279,11 +263,11 @@ public class MainPreferences extends PreferenceFragment
|
||||
|
||||
private void onSignInPreferenceStateChanged() {
|
||||
// Remove "Account" section header if the personalized sign-in promo is shown.
|
||||
@@ -208,7 +208,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
|
||||
}
|
||||
|
||||
// TemplateUrlService.LoadListener implementation.
|
||||
@@ -306,9 +290,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
@@ -302,9 +286,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
return new ManagedPreferenceDelegate() {
|
||||
@Override
|
||||
public boolean isPreferenceControlledByPolicy(Preference preference) {
|
||||
@@ -218,7 +218,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
|
||||
if (PREF_SEARCH_ENGINE.equals(preference.getKey())) {
|
||||
return TemplateUrlService.getInstance().isDefaultSearchManaged();
|
||||
}
|
||||
@@ -317,11 +298,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
@@ -313,11 +294,6 @@ public class MainPreferences extends PreferenceFragment
|
||||
|
||||
@Override
|
||||
public boolean isPreferenceClickDisabledByPolicy(Preference preference) {
|
||||
|
||||
@@ -2,6 +2,39 @@ From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 22 Dec 2016 07:15:34 -0500
|
||||
Subject: Enable -fwrapv in Clang for non-UBSan builds
|
||||
|
||||
Using -fwrapv (notably only when not using signed integer overflow checking -
|
||||
since it will override it and result in not performing checks) is just common
|
||||
sense since it eliminates the chance of security vulnerabilities being
|
||||
introduced by optimizations based on signed overflow being undefined.
|
||||
That has happened before, and those optimizations don't even add up to a 0.1%
|
||||
performance increase for this kind of software. It's not worth having.
|
||||
The Linux kernel passes -fwrapv and also -fno-strict-aliasing to disable those
|
||||
dangerous optimizations (since there is so much incorrect code they can break).
|
||||
In fact, it is easy to point to dozens of known examples of invalid code that
|
||||
could potentially be broken by those optimizations.
|
||||
|
||||
It is not acceptable for projects to be using optimizations that are known to
|
||||
be broken with a bunch of code in their tree.
|
||||
They put barely any effort into even fixing the known cases.
|
||||
Chromium has blacklists for UBSan for 'false positives' (none of which are
|
||||
actually false positives, but rather "undefined, but not a bug beyond
|
||||
potentially being broken by optimizations or even code generation without
|
||||
them") and also for components too full of these bugs for them to currently
|
||||
want to bother with it. That includes a bunch of signed overflow issues
|
||||
(there is sadly no detection for aliasing violations, which are fairly common,
|
||||
but not that common).
|
||||
|
||||
Ideally, -fwrapv could be always passed, but unfortunately the way it is
|
||||
implemented has silly interactions with other switches.
|
||||
The reason it would still make sense to pass it is because due to their UBSan
|
||||
blacklists, they get far from full coverage with it, so -fwrapv would still
|
||||
be better than nothing where it's not being used.
|
||||
|
||||
Since -fwrapv makes signed integer overflow well-defined, Clang will disable
|
||||
the UBSan checks for signed integer overflow, including in the
|
||||
production-oriented trapping mode used for hardening.
|
||||
|
||||
Excerpt from https://github.com/bromite/bromite/issues/226
|
||||
---
|
||||
build/config/compiler/BUILD.gn | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 15 Mar 2019 10:05:14 +0100
|
||||
Subject: Enable secure DNS mode by default in DnsTransaction.
|
||||
|
||||
---
|
||||
chrome/browser/net/dns_probe_runner.cc | 2 +-
|
||||
components/certificate_transparency/log_dns_client.cc | 2 +-
|
||||
net/dns/host_resolver_impl.cc | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc
|
||||
--- a/chrome/browser/net/dns_probe_runner.cc
|
||||
+++ b/chrome/browser/net/dns_probe_runner.cc
|
||||
@@ -110,7 +110,7 @@ void DnsProbeRunner::RunProbe(const base::Closure& callback) {
|
||||
kKnownGoodHostname, net::dns_protocol::kTypeA,
|
||||
base::Bind(&DnsProbeRunner::OnTransactionComplete,
|
||||
weak_factory_.GetWeakPtr()),
|
||||
- NetLogWithSource(), net::SecureDnsMode::AUTOMATIC);
|
||||
+ NetLogWithSource(), net::SecureDnsMode::SECURE);
|
||||
|
||||
transaction_->Start();
|
||||
}
|
||||
diff --git a/components/certificate_transparency/log_dns_client.cc b/components/certificate_transparency/log_dns_client.cc
|
||||
--- a/components/certificate_transparency/log_dns_client.cc
|
||||
+++ b/components/certificate_transparency/log_dns_client.cc
|
||||
@@ -472,7 +472,7 @@ bool AuditProofQueryImpl::StartDnsTransaction(const std::string& qname) {
|
||||
qname, net::dns_protocol::kTypeTXT,
|
||||
base::BindOnce(&AuditProofQueryImpl::OnDnsTransactionComplete,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
- net_log_, net::SecureDnsMode::AUTOMATIC);
|
||||
+ net_log_, net::SecureDnsMode::SECURE);
|
||||
|
||||
current_dns_transaction_->Start();
|
||||
return true;
|
||||
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
|
||||
--- a/net/dns/host_resolver_impl.cc
|
||||
+++ b/net/dns/host_resolver_impl.cc
|
||||
@@ -1066,7 +1066,7 @@ class HostResolverImpl::DnsTask : public base::SupportsWeakPtr<DnsTask> {
|
||||
base::BindOnce(&DnsTask::OnTransactionComplete,
|
||||
base::Unretained(this), tick_clock_->NowTicks(),
|
||||
dns_query_type),
|
||||
- net_log_, SecureDnsMode::AUTOMATIC);
|
||||
+ net_log_, SecureDnsMode::SECURE);
|
||||
trans->SetRequestContext(delegate_->url_request_context());
|
||||
trans->SetRequestPriority(delegate_->priority());
|
||||
return trans;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 17 Mar 2019 19:09:00 +0100
|
||||
Subject: Enable site per process isolation for devices with enough memory
|
||||
|
||||
---
|
||||
chrome/common/chrome_features.cc | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -518,11 +518,7 @@ const base::Feature kShowTrustedPublisherURL{"ShowTrustedPublisherURL",
|
||||
// (e.g. this approach lets ChromeCast avoid site-per-process mode).
|
||||
const base::Feature kSitePerProcess {
|
||||
"site-per-process",
|
||||
-#if defined(OS_ANDROID)
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#else
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#endif
|
||||
};
|
||||
|
||||
// kSitePerProcessOnlyForHighMemoryClients is checked before kSitePerProcess,
|
||||
@@ -535,7 +531,7 @@ const base::Feature kSitePerProcess {
|
||||
// base::SysInfo::AmountOfPhysicalMemoryMB().
|
||||
const base::Feature kSitePerProcessOnlyForHighMemoryClients{
|
||||
"site-per-process-only-for-high-memory-clients",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
const char kSitePerProcessOnlyForHighMemoryClientsParamName[] =
|
||||
"site-per-process-low-memory-cutoff-mb";
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Open YouTube links in Bromite
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
|
||||
@@ -403,6 +403,13 @@ public class ExternalNavigationHandler {
|
||||
@@ -401,6 +401,13 @@ public class ExternalNavigationHandler {
|
||||
return OverrideUrlLoadingResult.NO_OVERRIDE;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,24 +3,39 @@ Date: Sun, 26 Nov 2017 11:40:05 +0100
|
||||
Subject: Restore classic new tab page
|
||||
|
||||
---
|
||||
chrome/browser/search/search.cc | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
chrome/browser/search/search.cc | 13 +------------
|
||||
1 file changed, 1 insertion(+), 12 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
|
||||
--- a/chrome/browser/search/search.cc
|
||||
+++ b/chrome/browser/search/search.cc
|
||||
@@ -156,10 +156,7 @@ bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
|
||||
@@ -154,16 +154,6 @@ bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ShouldShowLocalNewTab(Profile* profile) {
|
||||
#if !defined(OS_ANDROID)
|
||||
-bool ShouldShowLocalNewTab(Profile* profile) {
|
||||
-#if !defined(OS_ANDROID)
|
||||
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
- return command_line->HasSwitch(switches::kForceLocalNtp) ||
|
||||
- (base::FeatureList::IsEnabled(features::kUseGoogleLocalNtp) &&
|
||||
- profile && DefaultSearchProviderIsGoogle(profile));
|
||||
+ return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
-#endif
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
bool ShouldDelayRemoteNTP(const GURL& search_provider_url, Profile* profile) {
|
||||
#if defined(OS_CHROMEOS)
|
||||
// On Chrome OS, if the session hasn't merged yet, we need to avoid loading
|
||||
@@ -190,8 +180,7 @@ struct NewTabURLDetails {
|
||||
|
||||
const GURL local_url(chrome::kChromeSearchLocalNtpUrl);
|
||||
|
||||
- if (ShouldShowLocalNewTab(profile))
|
||||
- return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
|
||||
+ return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
|
||||
|
||||
const TemplateURL* template_url =
|
||||
GetDefaultSearchProviderTemplateURL(profile);
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 12 Mar 2018 20:31:44 +0100
|
||||
Subject: Specify image URL for Qwant search engine
|
||||
|
||||
---
|
||||
components/search_engines/prepopulated_engines.json | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
|
||||
--- a/components/search_engines/prepopulated_engines.json
|
||||
+++ b/components/search_engines/prepopulated_engines.json
|
||||
@@ -186,6 +186,7 @@
|
||||
"favicon_url": "https://www.qwant.com/favicon.ico",
|
||||
"search_url": "https://www.qwant.com/?q={searchTerms}&client=opensearch",
|
||||
"suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}&client=opensearch",
|
||||
+ "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
|
||||
"type": "SEARCH_ENGINE_QWANT",
|
||||
"id": 94
|
||||
},
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
From: dalyk <dalyk@google.com>
|
||||
Date: Wed, 13 Feb 2019 17:50:04 +0000
|
||||
Subject: Support different secure DNS modes within DnsTransaction.
|
||||
|
||||
In SECURE mode, only DnsHTTPAttempts should be made. In AUTOMATIC mode,
|
||||
DnsHTTPAttempts should be made first, before falling back to insecure
|
||||
attempts. In OFF mode, only insecure attempts should be made.
|
||||
|
||||
Follow-up work will correct cache lookups for SECURE and AUTOMATIC modes,
|
||||
remove the system resolver fallback for SECURE mode, set the mode
|
||||
based on the pref setting, and make AUTOMATIC mode more conservative by
|
||||
incorporating state related to DoH (DoH probes, successive DoH failures).
|
||||
|
||||
There should be no change in behavior experienced by users configuring
|
||||
DoH via the command line since AUTOMATIC mode is used for all queries
|
||||
currently.
|
||||
|
||||
Bug: 878582
|
||||
Change-Id: I5539c5273eb846c95f9a7cdab95429522bc43f50
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/1450858
|
||||
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
|
||||
Commit-Queue: Katharine Daly <dalyk@google.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#631784}
|
||||
---
|
||||
chrome/browser/net/dns_probe_runner.cc | 3 +-
|
||||
.../certificate_transparency/log_dns_client.cc | 3 +-
|
||||
net/dns/BUILD.gn | 1 +
|
||||
net/dns/dns_test_util.cc | 3 +-
|
||||
net/dns/dns_transaction.cc | 42 ++++++---
|
||||
net/dns/dns_transaction.h | 10 ++-
|
||||
net/dns/dns_transaction_unittest.cc | 99 ++++++++++++++++++++--
|
||||
net/dns/dns_util.h | 12 +++
|
||||
net/dns/host_resolver_impl.cc | 2 +-
|
||||
9 files changed, 154 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/net/dns_probe_runner.cc b/chrome/browser/net/dns_probe_runner.cc
|
||||
--- a/chrome/browser/net/dns_probe_runner.cc
|
||||
+++ b/chrome/browser/net/dns_probe_runner.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "net/dns/dns_client.h"
|
||||
#include "net/dns/dns_response.h"
|
||||
#include "net/dns/dns_transaction.h"
|
||||
+#include "net/dns/dns_util.h"
|
||||
#include "net/dns/public/dns_protocol.h"
|
||||
#include "net/log/net_log_with_source.h"
|
||||
|
||||
@@ -109,7 +110,7 @@ void DnsProbeRunner::RunProbe(const base::Closure& callback) {
|
||||
kKnownGoodHostname, net::dns_protocol::kTypeA,
|
||||
base::Bind(&DnsProbeRunner::OnTransactionComplete,
|
||||
weak_factory_.GetWeakPtr()),
|
||||
- NetLogWithSource());
|
||||
+ NetLogWithSource(), net::SecureDnsMode::AUTOMATIC);
|
||||
|
||||
transaction_->Start();
|
||||
}
|
||||
diff --git a/components/certificate_transparency/log_dns_client.cc b/components/certificate_transparency/log_dns_client.cc
|
||||
--- a/components/certificate_transparency/log_dns_client.cc
|
||||
+++ b/components/certificate_transparency/log_dns_client.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "net/dns/dns_config.h"
|
||||
#include "net/dns/dns_response.h"
|
||||
#include "net/dns/dns_transaction.h"
|
||||
+#include "net/dns/dns_util.h"
|
||||
#include "net/dns/public/dns_protocol.h"
|
||||
#include "net/dns/record_parsed.h"
|
||||
#include "net/dns/record_rdata.h"
|
||||
@@ -471,7 +472,7 @@ bool AuditProofQueryImpl::StartDnsTransaction(const std::string& qname) {
|
||||
qname, net::dns_protocol::kTypeTXT,
|
||||
base::BindOnce(&AuditProofQueryImpl::OnDnsTransactionComplete,
|
||||
weak_ptr_factory_.GetWeakPtr()),
|
||||
- net_log_);
|
||||
+ net_log_, net::SecureDnsMode::AUTOMATIC);
|
||||
|
||||
current_dns_transaction_->Start();
|
||||
return true;
|
||||
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
|
||||
--- a/net/dns/BUILD.gn
|
||||
+++ b/net/dns/BUILD.gn
|
||||
@@ -291,6 +291,7 @@ source_set("dns_client") {
|
||||
"dns_client.h",
|
||||
"dns_response.h",
|
||||
"dns_transaction.h",
|
||||
+ "dns_util.h",
|
||||
"record_parsed.h",
|
||||
"record_rdata.h",
|
||||
]
|
||||
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
|
||||
--- a/net/dns/dns_test_util.cc
|
||||
+++ b/net/dns/dns_test_util.cc
|
||||
@@ -441,7 +441,8 @@ class MockDnsClient::MockTransactionFactory : public DnsTransactionFactory {
|
||||
const std::string& hostname,
|
||||
uint16_t qtype,
|
||||
DnsTransactionFactory::CallbackType callback,
|
||||
- const NetLogWithSource&) override {
|
||||
+ const NetLogWithSource&,
|
||||
+ SecureDnsMode) override {
|
||||
std::unique_ptr<MockTransaction> transaction =
|
||||
std::make_unique<MockTransaction>(rules_, hostname, qtype,
|
||||
std::move(callback));
|
||||
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
|
||||
--- a/net/dns/dns_transaction.cc
|
||||
+++ b/net/dns/dns_transaction.cc
|
||||
@@ -772,11 +772,13 @@ class DnsTransactionImpl : public DnsTransaction,
|
||||
uint16_t qtype,
|
||||
DnsTransactionFactory::CallbackType callback,
|
||||
const NetLogWithSource& net_log,
|
||||
- const OptRecordRdata* opt_rdata)
|
||||
+ const OptRecordRdata* opt_rdata,
|
||||
+ SecureDnsMode secure_dns_mode)
|
||||
: session_(session),
|
||||
hostname_(hostname),
|
||||
qtype_(qtype),
|
||||
opt_rdata_(opt_rdata),
|
||||
+ secure_dns_mode_(secure_dns_mode),
|
||||
callback_(std::move(callback)),
|
||||
net_log_(net_log),
|
||||
qnames_initial_size_(0),
|
||||
@@ -919,12 +921,17 @@ class DnsTransactionImpl : public DnsTransaction,
|
||||
}
|
||||
|
||||
AttemptResult MakeAttempt() {
|
||||
- // Make an HTTP attempt unless we have already made more attempts
|
||||
- // than we have configured servers. Otherwise make a UDP attempt
|
||||
- // as long as we have configured nameservers.
|
||||
DnsConfig config = session_->config();
|
||||
- if (doh_attempts_ < config.dns_over_https_servers.size())
|
||||
+ // In AUTOMATIC and SECURE mode, make an HTTP attempt unless we have already
|
||||
+ // made more attempts than we have configured servers.
|
||||
+ if (secure_dns_mode_ != SecureDnsMode::OFF &&
|
||||
+ doh_attempts_ < config.dns_over_https_servers.size()) {
|
||||
return MakeHTTPAttempt(config.dns_over_https_servers);
|
||||
+ }
|
||||
+ // In AUTOMATIC mode, insecure attempts are allowed after HTTP attempts are
|
||||
+ // exhausted. In OFF mode, only insecure attempts are allowed. It should
|
||||
+ // not be possible to reach this point in SECURE mode.
|
||||
+ DCHECK_NE(secure_dns_mode_, SecureDnsMode::SECURE);
|
||||
DCHECK_GT(config.nameservers.size(), 0u);
|
||||
return MakeUDPAttempt();
|
||||
}
|
||||
@@ -1112,8 +1119,19 @@ class DnsTransactionImpl : public DnsTransaction,
|
||||
if (had_tcp_attempt_)
|
||||
return false;
|
||||
const DnsConfig& config = session_->config();
|
||||
- return attempts_.size() < config.attempts * config.nameservers.size() +
|
||||
- config.dns_over_https_servers.size();
|
||||
+ unsigned insecure_attempts_possible =
|
||||
+ config.attempts * config.nameservers.size();
|
||||
+ unsigned secure_attempts_possible = config.dns_over_https_servers.size();
|
||||
+
|
||||
+ switch (secure_dns_mode_) {
|
||||
+ case SecureDnsMode::SECURE:
|
||||
+ return attempts_.size() < secure_attempts_possible;
|
||||
+ case SecureDnsMode::AUTOMATIC:
|
||||
+ return attempts_.size() <
|
||||
+ secure_attempts_possible + insecure_attempts_possible;
|
||||
+ case SecureDnsMode::OFF:
|
||||
+ return attempts_.size() < insecure_attempts_possible;
|
||||
+ }
|
||||
}
|
||||
|
||||
// Resolves the result of a DnsAttempt until a terminal result is reached
|
||||
@@ -1204,6 +1222,7 @@ class DnsTransactionImpl : public DnsTransaction,
|
||||
std::string hostname_;
|
||||
uint16_t qtype_;
|
||||
const OptRecordRdata* opt_rdata_;
|
||||
+ const SecureDnsMode secure_dns_mode_;
|
||||
// Cleared in DoCallback.
|
||||
DnsTransactionFactory::CallbackType callback_;
|
||||
|
||||
@@ -1248,10 +1267,11 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory {
|
||||
const std::string& hostname,
|
||||
uint16_t qtype,
|
||||
CallbackType callback,
|
||||
- const NetLogWithSource& net_log) override {
|
||||
- return std::make_unique<DnsTransactionImpl>(session_.get(), hostname, qtype,
|
||||
- std::move(callback), net_log,
|
||||
- opt_rdata_.get());
|
||||
+ const NetLogWithSource& net_log,
|
||||
+ SecureDnsMode secure_dns_mode) override {
|
||||
+ return std::make_unique<DnsTransactionImpl>(
|
||||
+ session_.get(), hostname, qtype, std::move(callback), net_log,
|
||||
+ opt_rdata_.get(), secure_dns_mode);
|
||||
}
|
||||
|
||||
void AddEDNSOption(const OptRecordRdata::Opt& opt) override {
|
||||
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
|
||||
--- a/net/dns/dns_transaction.h
|
||||
+++ b/net/dns/dns_transaction.h
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "net/base/request_priority.h"
|
||||
+#include "net/dns/dns_util.h"
|
||||
#include "net/dns/record_rdata.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -69,11 +70,18 @@ class NET_EXPORT_PRIVATE DnsTransactionFactory {
|
||||
//
|
||||
// The transaction will run |callback| upon asynchronous completion.
|
||||
// The |net_log| is used as the parent log.
|
||||
+ //
|
||||
+ // The |secure_dns_mode| specifies the order in which secure and/or insecure
|
||||
+ // DNS lookups will be performed. In SECURE mode, only secure lookups will be
|
||||
+ // perfomed. In AUTOMATIC mode, secure lookups will be performed first when
|
||||
+ // possible, and insecure lookups will be performed as a fallback. In OFF
|
||||
+ // mode, only insecure lookups will be performed.
|
||||
virtual std::unique_ptr<DnsTransaction> CreateTransaction(
|
||||
const std::string& hostname,
|
||||
uint16_t qtype,
|
||||
CallbackType callback,
|
||||
- const NetLogWithSource& net_log) WARN_UNUSED_RESULT = 0;
|
||||
+ const NetLogWithSource& net_log,
|
||||
+ SecureDnsMode secure_dns_mode) WARN_UNUSED_RESULT = 0;
|
||||
|
||||
// The given EDNS0 option will be included in all DNS queries performed by
|
||||
// transactions from this factory.
|
||||
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
|
||||
--- a/net/dns/dns_transaction_unittest.cc
|
||||
+++ b/net/dns/dns_transaction_unittest.cc
|
||||
@@ -246,7 +246,17 @@ class TestSocketFactory : public MockClientSocketFactory {
|
||||
remote_endpoints_.push_back(endpoint);
|
||||
}
|
||||
|
||||
- std::vector<IPEndPoint> remote_endpoints_;
|
||||
+ struct RemoteNameserver {
|
||||
+ RemoteNameserver(IPEndPoint insecure_nameserver)
|
||||
+ : insecure_nameserver(insecure_nameserver) {}
|
||||
+ RemoteNameserver(DnsConfig::DnsOverHttpsServerConfig secure_nameserver)
|
||||
+ : secure_nameserver(secure_nameserver) {}
|
||||
+
|
||||
+ base::Optional<IPEndPoint> insecure_nameserver;
|
||||
+ base::Optional<DnsConfig::DnsOverHttpsServerConfig> secure_nameserver;
|
||||
+ };
|
||||
+
|
||||
+ std::vector<RemoteNameserver> remote_endpoints_;
|
||||
bool fail_next_socket_;
|
||||
|
||||
private:
|
||||
@@ -269,6 +279,7 @@ class TransactionHelper {
|
||||
int expected_answer_count)
|
||||
: hostname_(hostname),
|
||||
qtype_(qtype),
|
||||
+ secure_dns_mode_(SecureDnsMode::AUTOMATIC),
|
||||
response_(nullptr),
|
||||
expected_answer_count_(expected_answer_count),
|
||||
cancel_in_callback_(false),
|
||||
@@ -277,13 +288,19 @@ class TransactionHelper {
|
||||
// Mark that the transaction shall be destroyed immediately upon callback.
|
||||
void set_cancel_in_callback() { cancel_in_callback_ = true; }
|
||||
|
||||
+ // Set the secure DNS mode for the transaction.
|
||||
+ void set_secure_dns_mode(SecureDnsMode secure_dns_mode) {
|
||||
+ secure_dns_mode_ = secure_dns_mode;
|
||||
+ }
|
||||
+
|
||||
void StartTransaction(DnsTransactionFactory* factory) {
|
||||
EXPECT_EQ(NULL, transaction_.get());
|
||||
transaction_ = factory->CreateTransaction(
|
||||
hostname_, qtype_,
|
||||
base::Bind(&TransactionHelper::OnTransactionComplete,
|
||||
base::Unretained(this)),
|
||||
- NetLogWithSource::Make(&net_log_, net::NetLogSourceType::NONE));
|
||||
+ NetLogWithSource::Make(&net_log_, net::NetLogSourceType::NONE),
|
||||
+ secure_dns_mode_);
|
||||
transaction_->SetRequestContext(&request_context_);
|
||||
transaction_->SetRequestPriority(DEFAULT_PRIORITY);
|
||||
EXPECT_EQ(hostname_, transaction_->GetHostname());
|
||||
@@ -360,6 +377,7 @@ class TransactionHelper {
|
||||
private:
|
||||
std::string hostname_;
|
||||
uint16_t qtype_;
|
||||
+ SecureDnsMode secure_dns_mode_;
|
||||
std::unique_ptr<DnsTransaction> transaction_;
|
||||
const DnsResponse* response_;
|
||||
int expected_answer_count_;
|
||||
@@ -669,9 +687,20 @@ class DnsTransactionTestBase : public testing::Test {
|
||||
// |servers|.
|
||||
void CheckServerOrder(const unsigned* servers, size_t num_attempts) {
|
||||
ASSERT_EQ(num_attempts, socket_factory_->remote_endpoints_.size());
|
||||
+ auto num_insecure_nameservers = session_->config().nameservers.size();
|
||||
for (size_t i = 0; i < num_attempts; ++i) {
|
||||
- EXPECT_EQ(socket_factory_->remote_endpoints_[i],
|
||||
- session_->config().nameservers[servers[i]]);
|
||||
+ if (servers[i] < num_insecure_nameservers) {
|
||||
+ // Check insecure server match.
|
||||
+ EXPECT_EQ(
|
||||
+ socket_factory_->remote_endpoints_[i].insecure_nameserver.value(),
|
||||
+ session_->config().nameservers[servers[i]]);
|
||||
+ } else {
|
||||
+ // Check secure server match.
|
||||
+ EXPECT_EQ(
|
||||
+ socket_factory_->remote_endpoints_[i].secure_nameserver.value(),
|
||||
+ session_->config()
|
||||
+ .dns_over_https_servers[servers[i] - num_insecure_nameservers]);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,6 +791,7 @@ class DnsTransactionTest : public DnsTransactionTestBase,
|
||||
if (server.use_post && request->method() == "POST") {
|
||||
if (url_base == request->url().spec()) {
|
||||
server_found = true;
|
||||
+ socket_factory_->remote_endpoints_.push_back(server);
|
||||
}
|
||||
} else if (!server.use_post && request->method() == "GET") {
|
||||
std::string prefix = url_base + "?dns=";
|
||||
@@ -769,6 +799,7 @@ class DnsTransactionTest : public DnsTransactionTestBase,
|
||||
request->url().spec().begin());
|
||||
if (mispair.first == prefix.end()) {
|
||||
server_found = true;
|
||||
+ socket_factory_->remote_endpoints_.push_back(server);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1552,6 +1583,43 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFallback) {
|
||||
TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
|
||||
SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
|
||||
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {1, 0};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
+}
|
||||
+
|
||||
+TEST_F(DnsTransactionTest, HttpsPostFailNoUDPFallbackInSecureMode) {
|
||||
+ config_.attempts = 1;
|
||||
+ ConfigureNumServers(2);
|
||||
+ ConfigDohServers(false /* clear_udp */, true /* use_post */, 2);
|
||||
+ AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
|
||||
+ SYNCHRONOUS, Transport::HTTPS);
|
||||
+ AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
|
||||
+ SYNCHRONOUS, Transport::HTTPS);
|
||||
+ TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_FAILED);
|
||||
+ helper0.set_secure_dns_mode(SecureDnsMode::SECURE);
|
||||
+ SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
|
||||
+ EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {2, 3};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
+}
|
||||
+
|
||||
+TEST_F(DnsTransactionTest, NoHttpsAttemptInOffMode) {
|
||||
+ config_.attempts = 2;
|
||||
+ ConfigureNumServers(2);
|
||||
+ ConfigDohServers(false /* clear_udp */, true /* use_post */, 2);
|
||||
+ AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
|
||||
+ SYNCHRONOUS, Transport::UDP);
|
||||
+ AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
|
||||
+ SYNCHRONOUS, Transport::UDP);
|
||||
+ AddQueryAndErrorResponse(0, kT0HostName, kT0Qtype, ERR_CONNECTION_REFUSED,
|
||||
+ SYNCHRONOUS, Transport::UDP);
|
||||
+ AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram,
|
||||
+ base::size(kT0ResponseDatagram), ASYNC, Transport::UDP);
|
||||
+ TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
|
||||
+ helper0.set_secure_dns_mode(SecureDnsMode::OFF);
|
||||
+ EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {0, 1, 0, 1};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFailThenUDPFallback) {
|
||||
@@ -1575,6 +1643,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenUDPFailThenUDPFallback) {
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(0), 1u);
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(1), 1u);
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(2), 2u);
|
||||
+ unsigned kOrder0[] = {3, 0, 1};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
|
||||
@@ -1595,6 +1665,8 @@ TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(0), 1u);
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(1), 1u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
|
||||
+ unsigned kOrder0[] = {2, 0, 1};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
|
||||
AddQueryAndErrorResponse(1, kT1HostName, kT1Qtype, ERR_CONNECTION_REFUSED,
|
||||
SYNCHRONOUS, Transport::HTTPS);
|
||||
@@ -1612,6 +1684,11 @@ TEST_F(DnsTransactionTest, HttpsMarkUdpBad) {
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(0), 0u);
|
||||
EXPECT_EQ(session_->NextGoodServerIndex(1), 0u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
|
||||
+ unsigned kOrder1[] = {
|
||||
+ 2, 0, 1, /* transaction0 */
|
||||
+ 2, 1, 0 /* transaction1 */
|
||||
+ };
|
||||
+ CheckServerOrder(kOrder1, base::size(kOrder1));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
|
||||
@@ -1627,7 +1704,6 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
|
||||
SYNCHRONOUS, Transport::HTTPS);
|
||||
AddQueryAndErrorResponse(1, kT1HostName, kT1Qtype, ERR_CONNECTION_REFUSED,
|
||||
SYNCHRONOUS, Transport::HTTPS);
|
||||
-
|
||||
AddQueryAndResponse(1, kT1HostName, kT1Qtype, kT1ResponseDatagram,
|
||||
base::size(kT1ResponseDatagram), ASYNC, Transport::HTTPS);
|
||||
TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
|
||||
@@ -1640,6 +1716,8 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(1), 3u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 3u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(3), 3u);
|
||||
+ unsigned kOrder0[] = {1, 2, 3};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
|
||||
EXPECT_TRUE(helper1.RunUntilDone(transaction_factory_.get()));
|
||||
// Server 0 is still our only UDP server, so will be good by definition.
|
||||
@@ -1651,6 +1729,11 @@ TEST_F(DnsTransactionTest, HttpsMarkHttpsBad) {
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(1), 2u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(2), 2u);
|
||||
EXPECT_EQ(session_->NextGoodDnsOverHttpsServerIndex(3), 2u);
|
||||
+ unsigned kOrder1[] = {
|
||||
+ 1, 2, 3, /* transaction0 */
|
||||
+ 3, 1, 2 /* transaction1 */
|
||||
+ };
|
||||
+ CheckServerOrder(kOrder1, base::size(kOrder1));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsPostFailThenHTTPFallback) {
|
||||
@@ -1662,6 +1745,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailThenHTTPFallback) {
|
||||
Transport::HTTPS);
|
||||
TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
|
||||
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {0, 1};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsPostFailTwiceThenUDPFallback) {
|
||||
@@ -1678,6 +1763,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailTwiceThenUDPFallback) {
|
||||
TransactionHelper helper0(kT0HostName, kT0Qtype, kT0RecordCount);
|
||||
SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
|
||||
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {1, 2, 0};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
}
|
||||
|
||||
TEST_F(DnsTransactionTest, HttpsPostFailTwice) {
|
||||
@@ -1692,6 +1779,8 @@ TEST_F(DnsTransactionTest, HttpsPostFailTwice) {
|
||||
TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_FAILED);
|
||||
SetDohJobMakerCallback(base::BindRepeating(DohJobMakerCallbackFailStart));
|
||||
EXPECT_TRUE(helper0.RunUntilDone(transaction_factory_.get()));
|
||||
+ unsigned kOrder0[] = {0, 1};
|
||||
+ CheckServerOrder(kOrder0, base::size(kOrder0));
|
||||
}
|
||||
|
||||
void MakeResponseWithCookie(URLRequest* request, HttpResponseInfo* info) {
|
||||
diff --git a/net/dns/dns_util.h b/net/dns/dns_util.h
|
||||
--- a/net/dns/dns_util.h
|
||||
+++ b/net/dns/dns_util.h
|
||||
@@ -93,6 +93,18 @@ uint16_t DnsQueryTypeToQtype(DnsQueryType dns_query_type);
|
||||
NET_EXPORT DnsQueryType
|
||||
AddressFamilyToDnsQueryType(AddressFamily address_family);
|
||||
|
||||
+// The SecureDnsMode specifies what types of lookups (secure/insecure) should
|
||||
+// be performed and in what order when resolving a specific query.
|
||||
+enum SecureDnsMode : int {
|
||||
+ // In OFF mode, no DoH lookups should be performed.
|
||||
+ OFF,
|
||||
+ // In AUTOMATIC mode, DoH lookups should be performed first if DoH is
|
||||
+ // available, and insecure DNS lookups should be performed as a fallback.
|
||||
+ AUTOMATIC,
|
||||
+ // In SECURE mode, only DoH lookups should be performed.
|
||||
+ SECURE,
|
||||
+};
|
||||
+
|
||||
} // namespace net
|
||||
|
||||
#endif // NET_DNS_DNS_UTIL_H_
|
||||
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
|
||||
--- a/net/dns/host_resolver_impl.cc
|
||||
+++ b/net/dns/host_resolver_impl.cc
|
||||
@@ -1066,7 +1066,7 @@ class HostResolverImpl::DnsTask : public base::SupportsWeakPtr<DnsTask> {
|
||||
base::BindOnce(&DnsTask::OnTransactionComplete,
|
||||
base::Unretained(this), tick_clock_->NowTicks(),
|
||||
dns_query_type),
|
||||
- net_log_);
|
||||
+ net_log_, SecureDnsMode::AUTOMATIC);
|
||||
trans->SetRequestContext(delegate_->url_request_context());
|
||||
trans->SetRequestPriority(delegate_->priority());
|
||||
return trans;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -2,6 +2,13 @@ From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 26 Dec 2018 10:20:24 -0500
|
||||
Subject: Switch to -fstack-protector-strong
|
||||
|
||||
This compiler option is already used for ChromeOS, but not yet on other
|
||||
platforms because there is push back against enabling an option resulting in
|
||||
~1-2% lower performance and ~2-3% larger binaries.
|
||||
|
||||
The size increase on Android is something they care a lot about since some
|
||||
devices have very little storage space. That also means ever so slightly
|
||||
higher memory/cache usage but not by the full 2-3%.
|
||||
---
|
||||
build/config/compiler/BUILD.gn | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 26 Jan 2017 01:30:12 -0500
|
||||
Subject: Use 64-bit WebView processes
|
||||
|
||||
64-bit processes introduce 10% or so higher memory consumption.
|
||||
The reason for preferring 64-bit processes is providing substantially better
|
||||
exploit mitigations at the expense of slightly more memory usage.
|
||||
|
||||
In addition to the standard mitigations, it also enables usage of
|
||||
https://github.com/AndroidHardening/hardened_malloc (where available).
|
||||
|
||||
It will provide high entropy ASLR (24-bit to 32-bit depending on whether the
|
||||
kernel uses 3 or 4 level page tables rather than 16-bit for 32-bit processes),
|
||||
high entropy stack canaries (56/64-bit instead of 24/32-bit depending on
|
||||
whether a zero byte is used) and also features like pointer authentication and
|
||||
memory tagging when those are made available in the future.
|
||||
|
||||
The reason why upstream started preferring 32-bit processes is to save memory,
|
||||
particularly since saving memory makes it feasible to use finer-grained
|
||||
sandboxing.
|
||||
---
|
||||
android_webview/apk/java/AndroidManifest.xml | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
|
||||
--- a/android_webview/apk/java/AndroidManifest.xml
|
||||
+++ b/android_webview/apk/java/AndroidManifest.xml
|
||||
@@ -25,7 +25,6 @@
|
||||
android:icon="@{{manifest_package|default('com.android.webview')}}:drawable/icon_webview"
|
||||
android:name="{{ application_name|default('com.android.webview.chromium.WebViewApplication') }}"
|
||||
android:multiArch="true"
|
||||
- android:use32bitAbi="true"
|
||||
android:extractNativeLibs="{{ trichrome_library is not defined }}">
|
||||
{# This part is shared between stand-alone WebView and Monochrome #}
|
||||
{% macro common(manifest_package, webview_lib) %}
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -40,7 +40,7 @@ Subject: ungoogled-chromium: disable safe browsing
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2696,8 +2696,6 @@ jumbo_split_static_library("browser") {
|
||||
@@ -2698,8 +2698,6 @@ jumbo_split_static_library("browser") {
|
||||
"download/download_commands.h",
|
||||
"download/download_crx_util.cc",
|
||||
"download/download_crx_util.h",
|
||||
@@ -308,7 +308,7 @@ diff --git a/chrome/browser/component_updater/file_type_policies_component_insta
|
||||
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -315,13 +315,6 @@ ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
|
||||
@@ -322,13 +322,6 @@ ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() {
|
||||
|
||||
void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
|
||||
download_manager_ = dm;
|
||||
@@ -322,7 +322,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
|
||||
}
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -616,16 +609,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
|
||||
@@ -636,16 +629,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
|
||||
|
||||
void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName(
|
||||
base::FilePath* filename) {
|
||||
|
||||
+10
-4
@@ -1,5 +1,8 @@
|
||||
Disable-third-party-cookies-by-default.patch
|
||||
Restore-classic-new-tab-page.patch
|
||||
Always-use-new-tab-page-for-default-home-page.patch
|
||||
Always-allow-partner-customisation.patch
|
||||
Always-show-home-page-settings.patch
|
||||
battery_status_service-disable-more-privacy-nightmares.patch
|
||||
Battery-API-return-nothing.patch
|
||||
google-cloud-messaging-disable-experiment-status-check.patch
|
||||
@@ -44,8 +47,8 @@ Disable-Omaha-update-checks.patch
|
||||
Disable-update-scheduler.patch
|
||||
Add-StartPage-search-engine.patch
|
||||
Add-English-only-search-engine.patch
|
||||
Specify-image-URL-for-Qwant-search-engine.patch
|
||||
Add-DuckDuckGo-Lite-search-engine.patch
|
||||
Add-Qwant-search-engine.patch
|
||||
Fix-crash-when-accessing-page-info-site-settings.patch
|
||||
openH264-enable-ARM-ARM64-optimizations.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
@@ -68,17 +71,18 @@ Add-flags-to-disable-device-motion-and-orientation-APIs.patch
|
||||
Punt-the-Widevine-version-string.patch
|
||||
Disable-metrics-on-all-I-O-threads.patch
|
||||
Add-a-flag-for-DNS-over-HTTPS.patch
|
||||
Support-different-secure-DNS-modes-within-DnsTransaction.patch
|
||||
Enable-secure-DNS-mode-by-default-in-DnsTransaction.patch
|
||||
Always-respect-async-dns-flag-regardless-of-SDK-version.patch
|
||||
Add-flag-to-configure-maximum-connections-per-host.patch
|
||||
Add-custom-tab-intents-privacy-option.patch
|
||||
Add-site-settings-option-for-session-only-cookies.patch
|
||||
Always-allow-partner-customisation.patch
|
||||
Change-default-homepage-to-new-tab-page.patch
|
||||
Add-bookmark-import-export-actions.patch
|
||||
Disable-promos-displayed-in-bookmarks-manager.patch
|
||||
Add-option-to-not-persist-tabs-across-sessions.patch
|
||||
Add-an-always-incognito-mode.patch
|
||||
Disable-fetching-of-all-field-trials.patch
|
||||
Disable-seed-based-field-trials.patch
|
||||
Disable-smooth-scrolling-on-Linux.patch
|
||||
Disable-plugins-enumeration.patch
|
||||
Remove-request-for-account-access-permission-on-reboot.patch
|
||||
@@ -105,6 +109,8 @@ Add-a-proxy-configuration-page.patch
|
||||
Do-not-ignore-download-location-prompt-setting.patch
|
||||
Disable-previews-by-default.patch
|
||||
Rollback-android-minSdkVersion-from-19-KitKat-to-16-JellyBean.patch
|
||||
Add-flag-to-show-hide-NTP-tiles.patch
|
||||
Use-4-tile-rows-never-show-logo.patch
|
||||
Disable-metrics-collection-for-NTP-tiles.patch
|
||||
Enable-site-per-process-isolation-for-devices-with-enough-memory.patch
|
||||
Use-64-bit-WebView-processes.patch
|
||||
Add-option-to-use-home-page-as-NTP.patch
|
||||
|
||||
Reference in New Issue
Block a user