| 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_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 ~UrlFetcherDownloader() override; | 39 ~UrlFetcherDownloader() override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // Overrides for CrxDownloader. | 42 // Overrides for CrxDownloader. |
| 43 void DoStartDownload(const GURL& url) override; | 43 void DoStartDownload(const GURL& url) override; |
| 44 | 44 |
| 45 // Overrides for URLFetcherDelegate. | 45 // Overrides for URLFetcherDelegate. |
| 46 void OnURLFetchComplete(const net::URLFetcher* source) override; | 46 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 47 void OnURLFetchDownloadProgress(const net::URLFetcher* source, | 47 void OnURLFetchDownloadProgress(const net::URLFetcher* source, |
| 48 int64_t current, | 48 int64_t current, |
| 49 int64_t total) override; | 49 int64_t total, |
| 50 int64_t current_network_bytes) override; |
| 50 std::unique_ptr<net::URLFetcher> url_fetcher_; | 51 std::unique_ptr<net::URLFetcher> url_fetcher_; |
| 51 net::URLRequestContextGetter* context_getter_; | 52 net::URLRequestContextGetter* context_getter_; |
| 52 | 53 |
| 53 base::Time download_start_time_; | 54 base::Time download_start_time_; |
| 54 | 55 |
| 55 int64_t downloaded_bytes_; | 56 int64_t downloaded_bytes_; |
| 56 int64_t total_bytes_; | 57 int64_t total_bytes_; |
| 57 | 58 |
| 58 base::ThreadChecker thread_checker_; | 59 base::ThreadChecker thread_checker_; |
| 59 | 60 |
| 60 DISALLOW_COPY_AND_ASSIGN(UrlFetcherDownloader); | 61 DISALLOW_COPY_AND_ASSIGN(UrlFetcherDownloader); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 } // namespace update_client | 64 } // namespace update_client |
| 64 | 65 |
| 65 #endif // COMPONENTS_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ | 66 #endif // COMPONENTS_UPDATE_CLIENT_URL_FETCHER_DOWNLOADER_H_ |
| OLD | NEW |