OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
7 | 7 |
| 8 #include "base/callback_forward.h" |
| 9 |
8 class ComponentUpdateService; | 10 class ComponentUpdateService; |
9 class Version; | 11 class Version; |
10 | 12 |
11 namespace base { | 13 namespace base { |
12 class DictionaryValue; | 14 class DictionaryValue; |
13 } | 15 } |
14 | 16 |
15 // Component update registration for Portable Native Client. | 17 // Component update registration for Portable Native Client. |
16 void RegisterPnaclComponent(ComponentUpdateService* cus); | 18 void RegisterPnaclComponent(ComponentUpdateService* cus); |
17 | 19 |
18 // Returns true if this browser is compatible with the given Pnacl component | 20 // Returns true if this browser is compatible with the given Pnacl component |
19 // manifest, with the version specified in the manifest in |version_out|. | 21 // manifest, with the version specified in the manifest in |version_out|. |
20 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, | 22 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, |
21 Version* version_out); | 23 Version* version_out); |
22 | 24 |
| 25 // Ask the given component update service to check for an update. |
| 26 // The |installed| callback will be run with |true| on success, |
| 27 // or run with |false| on an error. |
| 28 // The callback is called on the UI thread. |
| 29 void CheckUpdatesForPnacl(ComponentUpdateService* cus, |
| 30 const base::Callback<void(bool)>& installed); |
| 31 |
23 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 32 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
OLD | NEW |