94 lines
4.6 KiB
Diff
94 lines
4.6 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/suggestions/tile/SiteSection.java | 2 +-
|
|
chrome/browser/engagement/important_sites_util.cc | 2 +-
|
|
components/history/core/browser/top_sites_impl.h | 2 +-
|
|
5 files changed, 7 insertions(+), 7 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
|
|
@@ -119,7 +119,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
|
|
/** Observer for overview mode. */
|
|
private EmptyOverviewModeObserver mOverviewObserver;
|
|
|
|
- private boolean mSearchProviderHasLogo = true;
|
|
+ private boolean mSearchProviderHasLogo = false;
|
|
private boolean mSearchProviderIsGoogle;
|
|
|
|
private boolean mInitialized;
|
|
@@ -523,7 +523,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
|
|
&& mInitialized) {
|
|
return;
|
|
}
|
|
- mSearchProviderHasLogo = hasLogo;
|
|
+ mSearchProviderHasLogo = false;
|
|
mSearchProviderIsGoogle = isGoogle;
|
|
|
|
updateTileGridPadding();
|
|
@@ -789,7 +789,7 @@ public class NewTabPageLayout extends LinearLayout implements TileGroup.Observer
|
|
}
|
|
|
|
private static int getMaxTileRows() {
|
|
- return 2;
|
|
+ return 4;
|
|
}
|
|
|
|
/**
|
|
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/android/java/src/org/chromium/chrome/browser/suggestions/tile/SiteSection.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SiteSection.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SiteSection.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/SiteSection.java
|
|
@@ -109,7 +109,7 @@ public class SiteSection extends OptionalLeaf implements TileGroup.Observer {
|
|
}
|
|
|
|
private static int getMaxTileRows() {
|
|
- return 2;
|
|
+ return 4;
|
|
}
|
|
|
|
@LayoutRes
|
|
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
|
|
@@ -62,7 +62,7 @@ static const int kTimesIgnoredForBlacklist = 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
|
|
@@ -48,7 +48,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
|
|
|