Release 72.0.3626.119

This commit is contained in:
csagan5 2019-02-22 09:38:54 +01:00
parent b615a77f51
commit 503e4b8f27
No known key found for this signature in database
GPG key ID: 64190A51D85DC0C5
8 changed files with 26951 additions and 29431 deletions

View file

@ -1,3 +1,9 @@
# 72.0.3626.119
* use AdGuard filters
* fixes for new tile rows usage
* re-introduce patch to hide NTP tiles
* disable NTP tile metrics collection
# 72.0.3626.114
* use 4 tile rows instead of 2 in the new tab page
* do not grant geolocation permission to default search engine (fixes https://github.com/bromite/bromite/issues/250)

View file

@ -75,7 +75,7 @@ Yes, since version 69. While the desktop version of Chromium has an option to di
# Features
* baked-in adblock engine with filters from EasyList, EasyPrivacy and others
* baked-in adblock engine
* remove click-tracking and AMP from search results
* DNS-over-HTTPS support via Google, Cloudflare, Quad9 and AdGuard servers
* [proxy configuration page](https://github.com/bromite/bromite/wiki/ProxyConfiguration) with PAC and custom proxy lists support
@ -148,9 +148,13 @@ The patches are to be applied second the order specified in the `patches_list.tx
* [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
* [AdBlock Plus](https://adblockplus.org/), [uBlock Origin](https://github.com/uBlockOrigin), [Peter Lowe's adservers list](https://pgl.yoyo.org/adservers/), [EasyList and EasyPrivacy](https://easylist.to/) for the filters included
* [Vadim Pleshkov](http://vadimpleshkov.me/) for Bromite's logo
# Filters credits
* [AdGuard](https://kb.adguard.com/en/general/adguard-ad-filters) for the English, Malware, Social media and Mobile filters
* [uBlock Origin](https://github.com/uBlockOrigin) for the privacy filter
* [Peter Lowe's adservers list](https://pgl.yoyo.org/adservers/)
# License
The patches published as part of the Bromite project are released under [GNU GPL v3](./LICENSE).

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,116 @@
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
@@ -1996,6 +1996,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"
@@ -162,6 +164,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(),
@@ -176,6 +182,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
@@ -167,6 +167,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
@@ -126,6 +126,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

View file

@ -0,0 +1,91 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 20 Feb 2019 21:41:26 +0100
Subject: Disable metrics collection for NTP tiles
---
.../android/ntp/most_visited_sites_bridge.cc | 21 ---------------------
components/ntp_tiles/BUILD.gn | 3 ---
2 files changed, 24 deletions(-)
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
@@ -25,7 +25,6 @@
#include "chrome/browser/thumbnails/thumbnail_list_source.h"
#include "components/favicon_base/favicon_types.h"
#include "components/history/core/browser/history_service.h"
-#include "components/ntp_tiles/metrics.h"
#include "components/ntp_tiles/most_visited_sites.h"
#include "components/ntp_tiles/section_type.h"
#include "components/rappor/rappor_service_impl.h"
@@ -47,7 +46,6 @@ using ntp_tiles::NTPTilesVector;
using ntp_tiles::SectionType;
using ntp_tiles::TileTitleSource;
using ntp_tiles::TileSource;
-using ntp_tiles::TileVisualType;
namespace {
@@ -252,7 +250,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
jint jtiles_count) {
- ntp_tiles::metrics::RecordPageImpression(jtiles_count);
}
void MostVisitedSitesBridge::RecordTileImpression(
@@ -265,18 +262,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
jint jsource,
jlong jdata_generation_time_ms,
const JavaParamRef<jstring>& jurl) {
- GURL url(ConvertJavaStringToUTF8(env, jurl));
- TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
- TileSource source = static_cast<TileSource>(jsource);
- TileVisualType visual_type = static_cast<TileVisualType>(jvisual_type);
- favicon_base::IconType icon_type =
- static_cast<favicon_base::IconType>(jicon_type);
-
- ntp_tiles::metrics::RecordTileImpression(
- ntp_tiles::NTPTileImpression(
- jindex, source, title_source, visual_type, icon_type,
- base::Time::FromJavaTime(jdata_generation_time_ms), url),
- g_browser_process->rappor_service());
}
void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
@@ -287,12 +272,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
jint title_source,
jint source,
jlong jdata_generation_time_ms) {
- ntp_tiles::metrics::RecordTileClick(ntp_tiles::NTPTileImpression(
- index, static_cast<TileSource>(source),
- static_cast<TileTitleSource>(title_source),
- static_cast<TileVisualType>(tile_type), favicon_base::IconType::kInvalid,
- base::Time::FromJavaTime(jdata_generation_time_ms),
- /*url_for_rappor=*/GURL()));
}
static jlong JNI_MostVisitedSitesBridge_Init(
diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn
--- a/components/ntp_tiles/BUILD.gn
+++ b/components/ntp_tiles/BUILD.gn
@@ -20,8 +20,6 @@ static_library("ntp_tiles") {
"icon_cacher.h",
"icon_cacher_impl.cc",
"icon_cacher_impl.h",
- "metrics.cc",
- "metrics.h",
"most_visited_sites.cc",
"most_visited_sites.h",
"ntp_tile.cc",
@@ -91,7 +89,6 @@ source_set("unit_tests") {
"custom_links_manager_impl_unittest.cc",
"custom_links_store_unittest.cc",
"icon_cacher_impl_unittest.cc",
- "metrics_unittest.cc",
"most_visited_sites_unittest.cc",
"popular_sites_impl_unittest.cc",
]
--
2.11.0

View file

@ -6,7 +6,10 @@ Subject: Use 4 tile rows, never show logo
.../java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java | 6 +++---
.../chromium/chrome/browser/suggestions/MostVisitedSitesBridge.java | 2 +-
.../src/org/chromium/chrome/browser/suggestions/SiteSection.java | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
components/history/core/browser/top_sites_impl.cc | 2 +-
components/history/core/browser/top_sites_impl.h | 4 ++--
components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
@ -46,7 +49,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Mos
* the UI supports it, getting more can raise unexpected issues.
*/
- public static final int MAX_TILE_COUNT = 12;
+ public static final int MAX_TILE_COUNT = 4 * 4;
+ public static final int MAX_TILE_COUNT = 12 * 2;
private long mNativeMostVisitedSitesBridge;
@ -62,6 +65,46 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sit
}
@LayoutRes
diff --git a/components/history/core/browser/top_sites_impl.cc b/components/history/core/browser/top_sites_impl.cc
--- a/components/history/core/browser/top_sites_impl.cc
+++ b/components/history/core/browser/top_sites_impl.cc
@@ -83,7 +83,7 @@ bool DoTitlesDiffer(const MostVisitedURLList& old_list,
// Max number of temporary images we'll cache. See comment above
// temp_images_ for details.
-const size_t kMaxTempTopImages = 8;
+const size_t kMaxTempTopImages = 8 * 2;
// The delay for the first HistoryService query at startup.
constexpr base::TimeDelta kFirstDelayAtStartup =
diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h
--- a/components/history/core/browser/top_sites_impl.h
+++ b/components/history/core/browser/top_sites_impl.h
@@ -60,10 +60,10 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver {
using CanAddURLToHistoryFn = base::Callback<bool(const GURL&)>;
// How many non-forced top sites to store in the cache.
- static constexpr size_t kNonForcedTopSitesNumber = 10;
+ static constexpr size_t kNonForcedTopSitesNumber = 4 * 4 + 2;
// How many forced top sites to store in the cache.
- static constexpr size_t kForcedTopSitesNumber = 10;
+ static constexpr size_t kForcedTopSitesNumber = 4 * 4 + 2;
TopSitesImpl(PrefService* pref_service,
HistoryService* history_service,
diff --git a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
--- a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
+++ b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
@@ -30,7 +30,7 @@ namespace ntp_snippets {
namespace {
-const int kMaxBookmarks = 10;
+const int kMaxBookmarks = 4 * 4 + 2;
const int kMaxBookmarkAgeInDays = 7;
const char* kMaxBookmarksParamName = "bookmarks_max_count";
--
2.11.0

View file

@ -41,7 +41,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
@@ -2647,8 +2647,6 @@ jumbo_split_static_library("browser") {
@@ -2649,8 +2649,6 @@ jumbo_split_static_library("browser") {
"download/download_commands.h",
"download/download_crx_util.cc",
"download/download_crx_util.h",

View file

@ -108,4 +108,6 @@ 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