Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: chrome/browser/android/popular_sites.cc

Issue 1340493002: Add initial version of chrome://popular-sites-internals page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch_country_version
Patch Set: review3 Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/popular_sites.h ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/popular_sites.cc
diff --git a/chrome/browser/android/popular_sites.cc b/chrome/browser/android/popular_sites.cc
index 26a626890f74d51d2d00df2e81f952fa995ceeb3..332f12ba40a43c34d99ccef7ed44d3aff4bf53da 100644
--- a/chrome/browser/android/popular_sites.cc
+++ b/chrome/browser/android/popular_sites.cc
@@ -155,18 +155,19 @@ PopularSites::PopularSites(Profile* profile,
const std::string& override_country,
const std::string& override_version,
const std::string& override_filename,
+ bool force_download,
const FinishedCallback& callback)
: callback_(callback), weak_ptr_factory_(this) {
base::FilePath path = GetPopularSitesPath();
// Re-download the file once on every Chrome startup, but use the cached
// local file afterwards.
- static bool overwrite = true;
+ static bool first_time = true;
downloader_.reset(new FileDownloader(
GetPopularSitesURL(
profile, override_country, override_version, override_filename),
- path, overwrite, profile->GetRequestContext(),
+ path, first_time || force_download, profile->GetRequestContext(),
base::Bind(&PopularSites::OnDownloadDone, base::Unretained(this), path)));
- overwrite = false;
+ first_time = false;
}
PopularSites::~PopularSites() {}
« no previous file with comments | « chrome/browser/android/popular_sites.h ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698