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 <memory> |
10 #include <set> | 11 #include <set> |
11 #include <stack> | 12 #include <stack> |
12 #include <string> | 13 #include <string> |
13 | 14 |
14 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
15 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
16 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
17 #include "base/macros.h" | 18 #include "base/macros.h" |
18 #include "base/memory/scoped_ptr.h" | |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/scoped_observer.h" | 20 #include "base/scoped_observer.h" |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "base/timer/timer.h" | 22 #include "base/timer/timer.h" |
23 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
24 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
25 #include "extensions/browser/extension_registry_observer.h" | 25 #include "extensions/browser/extension_registry_observer.h" |
26 #include "extensions/browser/updater/extension_downloader.h" | 26 #include "extensions/browser/updater/extension_downloader.h" |
27 #include "extensions/browser/updater/extension_downloader_delegate.h" | 27 #include "extensions/browser/updater/extension_downloader_delegate.h" |
28 #include "extensions/browser/updater/manifest_fetch_data.h" | 28 #include "extensions/browser/updater/manifest_fetch_data.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 bool alive_; | 233 bool alive_; |
234 | 234 |
235 // Pointer back to the service that owns this ExtensionUpdater. | 235 // Pointer back to the service that owns this ExtensionUpdater. |
236 ExtensionServiceInterface* service_; | 236 ExtensionServiceInterface* service_; |
237 | 237 |
238 // A closure passed into the ExtensionUpdater to teach it how to construct | 238 // A closure passed into the ExtensionUpdater to teach it how to construct |
239 // new ExtensionDownloader instances. | 239 // new ExtensionDownloader instances. |
240 const ExtensionDownloader::Factory downloader_factory_; | 240 const ExtensionDownloader::Factory downloader_factory_; |
241 | 241 |
242 // Fetches the crx files for the extensions that have an available update. | 242 // Fetches the crx files for the extensions that have an available update. |
243 scoped_ptr<ExtensionDownloader> downloader_; | 243 std::unique_ptr<ExtensionDownloader> downloader_; |
244 | 244 |
245 base::OneShotTimer timer_; | 245 base::OneShotTimer timer_; |
246 int frequency_seconds_; | 246 int frequency_seconds_; |
247 bool will_check_soon_; | 247 bool will_check_soon_; |
248 | 248 |
249 ExtensionPrefs* extension_prefs_; | 249 ExtensionPrefs* extension_prefs_; |
250 PrefService* prefs_; | 250 PrefService* prefs_; |
251 Profile* profile_; | 251 Profile* profile_; |
252 | 252 |
253 std::map<int, InProgressCheck> requests_in_progress_; | 253 std::map<int, InProgressCheck> requests_in_progress_; |
(...skipping 20 matching lines...) Expand all Loading... |
274 std::map<std::string, ThrottleInfo> throttle_info_; | 274 std::map<std::string, ThrottleInfo> throttle_info_; |
275 | 275 |
276 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; | 276 base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_; |
277 | 277 |
278 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); | 278 DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater); |
279 }; | 279 }; |
280 | 280 |
281 } // namespace extensions | 281 } // namespace extensions |
282 | 282 |
283 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ | 283 #endif // CHROME_BROWSER_EXTENSIONS_UPDATER_EXTENSION_UPDATER_H_ |
OLD | NEW |