OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 // Send a notification if we're finished updating. | 235 // Send a notification if we're finished updating. |
236 void NotifyIfFinished(int request_id); | 236 void NotifyIfFinished(int request_id); |
237 | 237 |
238 void ExtensionCheckFinished(const std::string& extension_id, | 238 void ExtensionCheckFinished(const std::string& extension_id, |
239 const FinishedCallback& callback); | 239 const FinishedCallback& callback); |
240 | 240 |
241 // Whether Start() has been called but not Stop(). | 241 // Whether Start() has been called but not Stop(). |
242 bool alive_; | 242 bool alive_; |
243 | 243 |
244 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; | |
245 | |
246 // Pointer back to the service that owns this ExtensionUpdater. | 244 // Pointer back to the service that owns this ExtensionUpdater. |
247 ExtensionServiceInterface* service_; | 245 ExtensionServiceInterface* service_; |
248 | 246 |
249 // A closure passed into the ExtensionUpdater to teach it how to construct | 247 // A closure passed into the ExtensionUpdater to teach it how to construct |
250 // new ExtensionDownloader instances. | 248 // new ExtensionDownloader instances. |
251 const ExtensionDownloader::Factory downloader_factory_; | 249 const ExtensionDownloader::Factory downloader_factory_; |
252 | 250 |
253 // Fetches the crx files for the extensions that have an available update. | 251 // Fetches the crx files for the extensions that have an available update. |
254 scoped_ptr<ExtensionDownloader> downloader_; | 252 scoped_ptr<ExtensionDownloader> downloader_; |
255 | 253 |
(...skipping 27 matching lines...) Expand all Loading... |
283 ExtensionCache* extension_cache_; | 281 ExtensionCache* extension_cache_; |
284 | 282 |
285 // Keeps track of when an extension tried to update itself, so we can throttle | 283 // Keeps track of when an extension tried to update itself, so we can throttle |
286 // checks to prevent too many requests from being made. | 284 // checks to prevent too many requests from being made. |
287 std::map<std::string, ThrottleInfo> throttle_info_; | 285 std::map<std::string, ThrottleInfo> throttle_info_; |
288 | 286 |
289 // Keeps track of extensions (by ID) whose update should be forced during the | 287 // Keeps track of extensions (by ID) whose update should be forced during the |
290 // next update check. | 288 // next update check. |
291 std::set<std::string> forced_updates_; | 289 std::set<std::string> forced_updates_; |
292 | 290 |
| 291 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; |
| 292 |
293 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); | 293 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); |
294 }; | 294 }; |
295 | 295 |
296 } // namespace extensions | 296 } // namespace extensions |
297 | 297 |
298 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 298 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
OLD | NEW |