| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ |
| 6 #define COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <bits.h> | 9 #include <bits.h> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 class BackgroundDownloader : public CrxDownloader { | 35 class BackgroundDownloader : public CrxDownloader { |
| 36 protected: | 36 protected: |
| 37 friend class CrxDownloader; | 37 friend class CrxDownloader; |
| 38 BackgroundDownloader(scoped_ptr<CrxDownloader> successor, | 38 BackgroundDownloader(scoped_ptr<CrxDownloader> successor, |
| 39 net::URLRequestContextGetter* context_getter, | 39 net::URLRequestContextGetter* context_getter, |
| 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 41 virtual ~BackgroundDownloader(); | 41 virtual ~BackgroundDownloader(); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // Overrides for CrxDownloader. | 44 // Overrides for CrxDownloader. |
| 45 virtual void DoStartDownload(const GURL& url) OVERRIDE; | 45 virtual void DoStartDownload(const GURL& url) override; |
| 46 | 46 |
| 47 // Called asynchronously on the |task_runner_| at different stages during | 47 // Called asynchronously on the |task_runner_| at different stages during |
| 48 // the download. |OnDownloading| can be called multiple times. | 48 // the download. |OnDownloading| can be called multiple times. |
| 49 // |EndDownload| switches the execution flow from the |task_runner_| to the | 49 // |EndDownload| switches the execution flow from the |task_runner_| to the |
| 50 // main thread. Accessing any data members of this object from the | 50 // main thread. Accessing any data members of this object from the |
| 51 // |task_runner_|after calling |EndDownload| is unsafe. | 51 // |task_runner_|after calling |EndDownload| is unsafe. |
| 52 void BeginDownload(const GURL& url); | 52 void BeginDownload(const GURL& url); |
| 53 void OnDownloading(); | 53 void OnDownloading(); |
| 54 void EndDownload(HRESULT hr); | 54 void EndDownload(HRESULT hr); |
| 55 | 55 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 // Contains the path of the downloaded file if the download was successful. | 111 // Contains the path of the downloaded file if the download was successful. |
| 112 base::FilePath response_; | 112 base::FilePath response_; |
| 113 | 113 |
| 114 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); | 114 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace component_updater | 117 } // namespace component_updater |
| 118 | 118 |
| 119 #endif // COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ | 119 #endif // COMPONENTS_COMPONENT_UPDATER_BACKGROUND_DOWNLOADER_WIN_H_ |
| OLD | NEW |