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_URL_FETCHER_DOWNLOADER_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_URL_FETCHER_DOWNLOADER_H_ |
6 #define COMPONENTS_COMPONENT_UPDATER_URL_FETCHER_DOWNLOADER_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_URL_FETCHER_DOWNLOADER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 public net::URLFetcherDelegate { | 27 public net::URLFetcherDelegate { |
28 protected: | 28 protected: |
29 friend class CrxDownloader; | 29 friend class CrxDownloader; |
30 UrlFetcherDownloader(scoped_ptr<CrxDownloader> successor, | 30 UrlFetcherDownloader(scoped_ptr<CrxDownloader> successor, |
31 net::URLRequestContextGetter* context_getter, | 31 net::URLRequestContextGetter* context_getter, |
32 scoped_refptr<base::SequencedTaskRunner> task_runner); | 32 scoped_refptr<base::SequencedTaskRunner> task_runner); |
33 virtual ~UrlFetcherDownloader(); | 33 virtual ~UrlFetcherDownloader(); |
34 | 34 |
35 private: | 35 private: |
36 // Overrides for CrxDownloader. | 36 // Overrides for CrxDownloader. |
37 virtual void DoStartDownload(const GURL& url) OVERRIDE; | 37 virtual void DoStartDownload(const GURL& url) override; |
38 | 38 |
39 // Overrides for URLFetcherDelegate. | 39 // Overrides for URLFetcherDelegate. |
40 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 40 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
41 virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, | 41 virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, |
42 int64_t current, | 42 int64_t current, |
43 int64_t total) OVERRIDE; | 43 int64_t total) override; |
44 scoped_ptr<net::URLFetcher> url_fetcher_; | 44 scoped_ptr<net::URLFetcher> url_fetcher_; |
45 net::URLRequestContextGetter* context_getter_; | 45 net::URLRequestContextGetter* context_getter_; |
46 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 46 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
47 | 47 |
48 base::Time download_start_time_; | 48 base::Time download_start_time_; |
49 | 49 |
50 int64_t downloaded_bytes_; | 50 int64_t downloaded_bytes_; |
51 int64_t total_bytes_; | 51 int64_t total_bytes_; |
52 | 52 |
53 base::ThreadChecker thread_checker_; | 53 base::ThreadChecker thread_checker_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(UrlFetcherDownloader); | 55 DISALLOW_COPY_AND_ASSIGN(UrlFetcherDownloader); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace component_updater | 58 } // namespace component_updater |
59 | 59 |
60 #endif // COMPONENTS_COMPONENT_UPDATER_URL_FETCHER_DOWNLOADER_H_ | 60 #endif // COMPONENTS_COMPONENT_UPDATER_URL_FETCHER_DOWNLOADER_H_ |
OLD | NEW |