Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: components/update_client/background_downloader_win.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Used to post responses back to the main thread. Initialized on the main 86 // Used to post responses back to the main thread. Initialized on the main
87 // loop but accessed from the task runner. 87 // loop but accessed from the task runner.
88 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 88 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
89 89
90 net::URLRequestContextGetter* context_getter_; 90 net::URLRequestContextGetter* context_getter_;
91 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 91 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
92 92
93 // The timer and the BITS interface pointers have thread affinity. These 93 // The timer and the BITS interface pointers have thread affinity. These
94 // members are initialized on the task runner and they must be destroyed 94 // members are initialized on the task runner and they must be destroyed
95 // on the task runner. 95 // on the task runner.
96 scoped_ptr<base::RepeatingTimer<BackgroundDownloader>> timer_; 96 scoped_ptr<base::RepeatingTimer> timer_;
97 97
98 base::win::ScopedComPtr<IBackgroundCopyManager> bits_manager_; 98 base::win::ScopedComPtr<IBackgroundCopyManager> bits_manager_;
99 base::win::ScopedComPtr<IBackgroundCopyJob> job_; 99 base::win::ScopedComPtr<IBackgroundCopyJob> job_;
100 100
101 // Contains the time when the download of the current url has started. 101 // Contains the time when the download of the current url has started.
102 base::Time download_start_time_; 102 base::Time download_start_time_;
103 103
104 // Contains the time when the BITS job is last seen making progress. 104 // Contains the time when the BITS job is last seen making progress.
105 base::Time job_stuck_begin_time_; 105 base::Time job_stuck_begin_time_;
106 106
107 // True if EndDownload was called. 107 // True if EndDownload was called.
108 bool is_completed_; 108 bool is_completed_;
109 109
110 // Contains the path of the downloaded file if the download was successful. 110 // Contains the path of the downloaded file if the download was successful.
111 base::FilePath response_; 111 base::FilePath response_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader); 113 DISALLOW_COPY_AND_ASSIGN(BackgroundDownloader);
114 }; 114 };
115 115
116 } // namespace update_client 116 } // namespace update_client
117 117
118 #endif // COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_ 118 #endif // COMPONENTS_UPDATE_CLIENT_BACKGROUND_DOWNLOADER_WIN_H_
OLDNEW
« no previous file with comments | « components/sync_driver/sync_stopped_reporter.h ('k') | components/update_client/background_downloader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698