46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Wed, 14 Feb 2018 12:56:01 +0100
|
|
Subject: Never fetch popular sites
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
components/ntp_tiles/popular_sites_impl.cc | 10 +++++++---
|
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
|
|
--- a/components/ntp_tiles/popular_sites_impl.cc
|
|
+++ b/components/ntp_tiles/popular_sites_impl.cc
|
|
@@ -64,7 +64,6 @@ const char kPopularSitesDefaultDirectory[] = "chrome/ntp/";
|
|
const char kPopularSitesDefaultCountryCode[] = "DEFAULT";
|
|
const char kPopularSitesDefaultVersion[] = "5";
|
|
const int kSitesExplorationStartVersion = 6;
|
|
-const int kPopularSitesRedownloadIntervalHours = 24;
|
|
#if BUILDFLAG(IS_IOS)
|
|
const char kIOSDefaultPopularSitesLocaleUS[] =
|
|
"https://www.gstatic.com/chrome/ntp/ios/"
|
|
@@ -330,7 +329,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
|
|
DCHECK(!callback_);
|
|
callback_ = std::move(callback);
|
|
|
|
- const base::Time last_download_time = base::Time::FromInternalValue(
|
|
+ if (force_download) {
|
|
+ std::move(callback_).Run(true);
|
|
+ return true;
|
|
+ }
|
|
+
|
|
+/* const base::Time last_download_time = base::Time::FromInternalValue(
|
|
prefs_->GetInt64(prefs::kPopularSitesLastDownloadPref));
|
|
const base::TimeDelta time_since_last_download =
|
|
base::Time::Now() - last_download_time;
|
|
@@ -347,7 +351,7 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
|
|
(time_since_last_download > redownload_interval) || url_changed) {
|
|
FetchPopularSites();
|
|
return true;
|
|
- }
|
|
+ }*/
|
|
return false;
|
|
}
|
|
|
|
--
|
|
2.25.1
|