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

Unified Diff: chrome/browser/component_updater/crx_downloader.h

Issue 250383008: Refactor the interface for the CrxDownloader to take a callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: chrome/browser/component_updater/crx_downloader.h
diff --git a/chrome/browser/component_updater/crx_downloader.h b/chrome/browser/component_updater/crx_downloader.h
index 408290c714e4b63bfc5457c5285539bb5e1ee120..1648d276c0314c3418ee0047cd198fd15a581cbd 100644
--- a/chrome/browser/component_updater/crx_downloader.h
+++ b/chrome/browser/component_updater/crx_downloader.h
@@ -78,22 +78,22 @@ class CrxDownloader {
static CrxDownloader* Create(
bool is_background_download,
net::URLRequestContextGetter* context_getter,
- scoped_refptr<base::SequencedTaskRunner> task_runner,
- const DownloadCallback& download_callback);
+ scoped_refptr<base::SequencedTaskRunner> task_runner);
virtual ~CrxDownloader();
// Starts the download. One instance of the class handles one download only.
// One instance of CrxDownloader can only be started once, otherwise the
// behavior is undefined. The callback gets invoked if the download can't
// be started.
- void StartDownloadFromUrl(const GURL& url);
- void StartDownload(const std::vector<GURL>& urls);
+ void StartDownloadFromUrl(const GURL& url,
+ const DownloadCallback& download_callback);
+ void StartDownload(const std::vector<GURL>& urls,
+ const DownloadCallback& download_callback);
const std::vector<DownloadMetrics> download_metrics() const;
protected:
- CrxDownloader(scoped_ptr<CrxDownloader> successor,
- const DownloadCallback& download_callback);
+ explicit CrxDownloader(scoped_ptr<CrxDownloader> successor);
// Handles the fallback in the case of multiple urls and routing of the
// download to the following successor in the chain. Derived classes must call

Powered by Google App Engine
This is Rietveld 408576698