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_POLICY_APP_PACK_UPDATER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_APP_PACK_UPDATER_H_ |
6 #define CHROME_BROWSER_POLICY_APP_PACK_UPDATER_H_ | 6 #define CHROME_BROWSER_POLICY_APP_PACK_UPDATER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/threading/sequenced_worker_pool.h" | 17 #include "base/threading/sequenced_worker_pool.h" |
18 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" | 18 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" |
19 #include "chrome/browser/policy/cloud_policy_subsystem.h" | 19 #include "chrome/browser/policy/cloud_policy_subsystem.h" |
20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
22 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
23 | 23 |
24 class CrxInstaller; | |
25 class GURL; | 24 class GURL; |
26 | 25 |
27 namespace extensions { | 26 namespace extensions { |
| 27 class CrxInstaller; |
28 class ExtensionDownloader; | 28 class ExtensionDownloader; |
29 class ExternalLoader; | 29 class ExternalLoader; |
30 } | 30 } |
31 | 31 |
32 namespace net { | 32 namespace net { |
33 class URLRequestContextGetter; | 33 class URLRequestContextGetter; |
34 } | 34 } |
35 | 35 |
36 namespace tracked_objects { | 36 namespace tracked_objects { |
37 class Location; | 37 class Location; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 const std::string& version); | 168 const std::string& version); |
169 | 169 |
170 // Invoked on the UI thread when a new AppPack entry has been installed in | 170 // Invoked on the UI thread when a new AppPack entry has been installed in |
171 // the AppPack cache. | 171 // the AppPack cache. |
172 void OnCacheEntryInstalled(const std::string& id, | 172 void OnCacheEntryInstalled(const std::string& id, |
173 const std::string& path, | 173 const std::string& path, |
174 const std::string& version); | 174 const std::string& version); |
175 | 175 |
176 // Handles failure to install CRX files. The file is deleted if it came from | 176 // Handles failure to install CRX files. The file is deleted if it came from |
177 // the cache. | 177 // the cache. |
178 void OnCrxInstallFailed(CrxInstaller* installer); | 178 void OnCrxInstallFailed(extensions::CrxInstaller* installer); |
179 | 179 |
180 // Helper to post blocking IO tasks to the blocking pool. | 180 // Helper to post blocking IO tasks to the blocking pool. |
181 void PostBlockingTask(const tracked_objects::Location& from_here, | 181 void PostBlockingTask(const tracked_objects::Location& from_here, |
182 const base::Closure& task); | 182 const base::Closure& task); |
183 | 183 |
184 // Sets |screen_saver_path_| and invokes |screen_saver_update_callback_| if | 184 // Sets |screen_saver_path_| and invokes |screen_saver_update_callback_| if |
185 // appropriate. | 185 // appropriate. |
186 void SetScreenSaverPath(const FilePath& path); | 186 void SetScreenSaverPath(const FilePath& path); |
187 | 187 |
188 // Marks extension |id| in |app_pack_extensions_| as having already been | 188 // Marks extension |id| in |app_pack_extensions_| as having already been |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 // Request context used by the |downloader_|. | 230 // Request context used by the |downloader_|. |
231 net::URLRequestContextGetter* request_context_; | 231 net::URLRequestContextGetter* request_context_; |
232 | 232 |
233 DISALLOW_COPY_AND_ASSIGN(AppPackUpdater); | 233 DISALLOW_COPY_AND_ASSIGN(AppPackUpdater); |
234 }; | 234 }; |
235 | 235 |
236 } // namespace policy | 236 } // namespace policy |
237 | 237 |
238 #endif // CHROME_BROWSER_POLICY_APP_PACK_UPDATER_H_ | 238 #endif // CHROME_BROWSER_POLICY_APP_PACK_UPDATER_H_ |
OLD | NEW |