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 fbe2259716e159230e285fc50cc309fb5dbe16aa..59851518885bb0051b7f6936052c855981928cbe 100644 |
--- a/chrome/browser/component_updater/crx_downloader.h |
+++ b/chrome/browser/component_updater/crx_downloader.h |
@@ -12,9 +12,14 @@ |
#include "base/files/file_path.h" |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/sequenced_task_runner.h" |
+#include "base/threading/thread_checker.h" |
#include "url/gurl.h" |
+namespace base { |
+class SequencedTaskRunner; |
+class SingleThreadTaskRunner; |
+} |
+ |
namespace net { |
class URLRequestContextGetter; |
} |
@@ -30,7 +35,7 @@ namespace component_updater { |
// When multiple urls and downloaders exists, first all the urls are tried, in |
// the order they are provided in the StartDownload function argument. After |
// that, the download request is routed to the next downloader in the chain. |
-// The members of this class expect to be called from the UI thread only. |
+// The members of this class expect to be called from the main thread only. |
class CrxDownloader { |
public: |
struct DownloadMetrics { |
@@ -87,7 +92,8 @@ class CrxDownloader { |
static CrxDownloader* Create( |
bool is_background_download, |
net::URLRequestContextGetter* context_getter, |
- scoped_refptr<base::SequencedTaskRunner> task_runner); |
+ scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner, |
blundell
2014/07/15 08:45:20
It would be good if these params could be given na
tommycli
2014/07/15 18:58:25
Done.
|
+ scoped_refptr<base::SingleThreadTaskRunner> single_thread_task_runner); |
virtual ~CrxDownloader(); |
void set_progress_callback(const ProgressCallback& progress_callback); |
@@ -127,6 +133,8 @@ class CrxDownloader { |
private: |
virtual void DoStartDownload(const GURL& url) = 0; |
+ base::ThreadChecker thread_checker_; |
+ |
std::vector<GURL> urls_; |
scoped_ptr<CrxDownloader> successor_; |
DownloadCallback download_callback_; |