LeOSium_webview/LeOS/patches/Use-4-tile-rows-never-show-...

81 lines
4.1 KiB
Diff
Raw Permalink Normal View History

2023-11-18 11:46:19 +01:00
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
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../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
@@ -118,7 +118,7 @@ public class NewTabPageLayout extends LinearLayout {
*/
private boolean mHasShownView;
- private boolean mSearchProviderHasLogo = true;
+ private boolean mSearchProviderHasLogo = false;
private boolean mSearchProviderIsGoogle;
private boolean mShowingNonStandardLogo;
@@ -433,7 +433,7 @@ public class NewTabPageLayout extends LinearLayout {
boolean isScrollableMvtEnabled, boolean searchProviderIsGoogle) {
assert mMvTilesContainerLayout != null;
- int maxRows = 2;
+ int maxRows = 4;
if (searchProviderIsGoogle && QueryTileUtils.isQueryTilesEnabledOnNTP()) {
maxRows = QueryTileSection.getMaxRowsForMostVisitedTiles(getContext());
}
@@ -654,7 +654,7 @@ public class NewTabPageLayout extends LinearLayout {
&& mInitialized) {
return;
}
- mSearchProviderHasLogo = hasLogo;
+ mSearchProviderHasLogo = false;
mSearchProviderIsGoogle = isGoogle;
updateTilesLayoutMargins();
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
@@ -22,7 +22,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
@@ -67,7 +67,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
@@ -40,7 +40,7 @@ class TopSitesImplTest;
struct SitesAndQueriesRequest;
// How many top sites to store in the cache.
-static constexpr size_t kTopSitesNumber = 10;
+static constexpr size_t kTopSitesNumber = 4 * 4 + 2;
// This class allows requests for most visited urls on any thread. All other
// methods must be invoked on the UI thread. All mutations to internal state
--
2.25.1