| 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_BACKGROUND_DOWNLOADER_WIN_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // the state is final, or false, if the download is allowed to continue. | 78 // the state is final, or false, if the download is allowed to continue. |
| 79 bool OnStateTransientError(); | 79 bool OnStateTransientError(); |
| 80 | 80 |
| 81 // Handles the job state corresponding to transferring data. Returns false | 81 // Handles the job state corresponding to transferring data. Returns false |
| 82 // always since this is never a final state. | 82 // always since this is never a final state. |
| 83 bool OnStateTransferring(); | 83 bool OnStateTransferring(); |
| 84 | 84 |
| 85 void StartTimer(); | 85 void StartTimer(); |
| 86 void OnTimer(); | 86 void OnTimer(); |
| 87 | 87 |
| 88 // Returns true if the timer is running or false if the timer is not |
| 89 // created or not running at all. |
| 90 bool TimerIsRunning() const; |
| 91 |
| 88 HRESULT QueueBitsJob(const GURL& url, IBackgroundCopyJob** job); | 92 HRESULT QueueBitsJob(const GURL& url, IBackgroundCopyJob** job); |
| 89 HRESULT CreateOrOpenJob(const GURL& url, IBackgroundCopyJob** job); | 93 HRESULT CreateOrOpenJob(const GURL& url, IBackgroundCopyJob** job); |
| 90 HRESULT InitializeNewJob( | 94 HRESULT InitializeNewJob( |
| 91 const base::win::ScopedComPtr<IBackgroundCopyJob>& job, | 95 const base::win::ScopedComPtr<IBackgroundCopyJob>& job, |
| 92 const GURL& url); | 96 const GURL& url); |
| 93 | 97 |
| 94 // Returns true if at the time of the call, it appears that the job | 98 // Returns true if at the time of the call, it appears that the job |
| 95 // has not been making progress toward completion. | 99 // has not been making progress toward completion. |
| 96 bool IsStuck(); | 100 bool IsStuck(); |
| 97 | 101 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 141 |
| 138 // Contains the path of the downloaded file if the download was successful. | 142 // Contains the path of the downloaded file if the download was successful. |
| 139 base::FilePath response_; | 143 base::FilePath response_; |
| 140 | 144 |
| 141 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); | 145 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); |
| 142 }; | 146 }; |
| 143 | 147 |
| 144 } // namespace update_client | 148 } // namespace update_client |
| 145 | 149 |
| 146 #endif // COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_ | 150 #endif // COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_ |
| OLD | NEW |