28 lines
870 B
Diff
28 lines
870 B
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Wed, 14 Feb 2018 12:56:01 +0100
|
|
Subject: Never fetch popular sites
|
|
|
|
---
|
|
components/ntp_tiles/popular_sites_impl.cc | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
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
|
|
@@ -275,6 +275,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
|
|
DCHECK(!callback_);
|
|
callback_ = std::move(callback);
|
|
|
|
+ if (force_download) {
|
|
+ std::move(callback_).Run(true);
|
|
+ return true;
|
|
+ }
|
|
+ return false;
|
|
+
|
|
const base::Time last_download_time = base::Time::FromInternalValue(
|
|
prefs_->GetInt64(prefs::kPopularSitesLastDownloadPref));
|
|
const base::TimeDelta time_since_last_download =
|
|
--
|
|
2.17.1
|
|
|