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

Unified Diff: chrome/browser/net/file_downloader.h

Issue 1308723005: Popular sites on the NTP: re-download popular suggestions once per Chrome run (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@knn_ordering
Patch Set: rebase 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.cc ('k') | chrome/browser/net/file_downloader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/file_downloader.h
diff --git a/chrome/browser/net/file_downloader.h b/chrome/browser/net/file_downloader.h
index 2f1c6399162b19bca22517de2569003afe530a12..d85b902f75cfb3c052ca3346ba009534bc43cef6 100644
--- a/chrome/browser/net/file_downloader.h
+++ b/chrome/browser/net/file_downloader.h
@@ -22,9 +22,9 @@ class URLRequestContextGetter;
class GURL;
// Helper class to download a file from a given URL and store it in a local
-// file. If the local file already exists, reports success without downloading
-// anything.
-// TODO(treib): Add a "bool overwrite" param?
+// file. If |overwrite| is true, any existing file will be overwritten;
+// otherwise if the local file already exists, this will report success without
+// downloading anything.
class FileDownloader : public net::URLFetcherDelegate {
public:
typedef base::Callback<void(bool /* success */)> DownloadFinishedCallback;
@@ -33,6 +33,7 @@ class FileDownloader : public net::URLFetcherDelegate {
// If the instance is destroyed before it is finished, |callback| is not run.
FileDownloader(const GURL& url,
const base::FilePath& path,
+ bool overwrite,
net::URLRequestContextGetter* request_context,
const DownloadFinishedCallback& callback);
~FileDownloader() override;
« no previous file with comments | « chrome/browser/android/popular_sites.cc ('k') | chrome/browser/net/file_downloader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698