Files
cromite/build/patches/Use-4-tile-rows-never-show-logo.patch
2021-10-16 22:28:37 +02:00

81 lines
4.2 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 21 Feb 2018 00:32:09 +0100
Subject: Use 4 tile rows, never show logo
---
.../org/chromium/chrome/browser/ntp/NewTabPageLayout.java | 6 +++---
.../suggestions/mostvisited/MostVisitedSitesBridge.java | 2 +-
chrome/browser/engagement/important_sites_util.cc | 2 +-
components/history/core/browser/top_sites_impl.h | 2 +-
4 files changed, 6 insertions(+), 6 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
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java
@@ -129,7 +129,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
*/
private boolean mHasShownView;
- private boolean mSearchProviderHasLogo = true;
+ private boolean mSearchProviderHasLogo = false;
private boolean mSearchProviderIsGoogle;
private boolean mShowingNonStandardLogo;
@@ -254,7 +254,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
mTileGroup = new TileGroup(tileRenderer, mManager, contextMenuManager, tileGroupDelegate,
/* observer = */ this, offlinePageBridge);
- int maxRows = 2;
+ int maxRows = 4;
if (searchProviderIsGoogle && QueryTileUtils.isQueryTilesEnabledOnNTP()) {
maxRows = QueryTileSection.getMaxRowsForMostVisitedTiles(getContext());
}
@@ -575,7 +575,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
&& mInitialized) {
return;
}
- mSearchProviderHasLogo = hasLogo;
+ mSearchProviderHasLogo = false;
mSearchProviderIsGoogle = isGoogle;
updateTileGridPadding();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java
@@ -24,7 +24,7 @@ public class MostVisitedSitesBridge implements MostVisitedSites {
* Maximum number of tiles that is explicitly supported. UMA relies on this value, so even if
* 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 = 12 * 2;
private long mNativeMostVisitedSitesBridge;
diff --git a/chrome/browser/engagement/important_sites_util.cc b/chrome/browser/engagement/important_sites_util.cc
--- a/chrome/browser/engagement/important_sites_util.cc
+++ b/chrome/browser/engagement/important_sites_util.cc
@@ -66,7 +66,7 @@ static const int kTimesIgnoredForSuppression = 3;
// These are the maximum # of bookmarks we can use as signals. If the user has
// <= kMaxBookmarks, then we just use those bookmarks. Otherwise we filter all
// bookmarks on site engagement > 0, sort, and trim to kMaxBookmarks.
-static const int kMaxBookmarks = 5;
+static const int kMaxBookmarks = 4 * 4 + 2;
// We need this to be a macro, as the histogram macros cache their pointers
// after the first call, so when we change the uma name we check fail if we're
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
@@ -47,7 +47,7 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver {
using CanAddURLToHistoryFn = base::RepeatingCallback<bool(const GURL&)>;
// How many top sites to store in the cache.
- static constexpr size_t kTopSitesNumber = 10;
+ static constexpr size_t kTopSitesNumber = 4 * 4 + 2;
TopSitesImpl(PrefService* pref_service,
HistoryService* history_service,
--
2.17.1