Chromium Code Reviews| Index: chrome/browser/component_updater/pnacl/pnacl_component_installer.h |
| diff --git a/chrome/browser/component_updater/pnacl/pnacl_component_installer.h b/chrome/browser/component_updater/pnacl/pnacl_component_installer.h |
| index 765b860fee09d9f37d9ba7be74e61baeb36ac6c7..d58751ac162eb9e3bd3eaaf08d07270c94710b99 100644 |
| --- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.h |
| +++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.h |
| @@ -5,17 +5,59 @@ |
| #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
| #define CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/component_updater/component_updater_service.h" |
| +#include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" |
| + |
| + |
|
sky
2013/03/26 21:04:44
nit: remove one of these newlines.
jvoung (off chromium)
2013/03/26 21:33:34
Done.
|
| class CommandLine; |
| -class ComponentUpdateService; |
| class Version; |
| namespace base { |
| class DictionaryValue; |
| } |
| -// Component update registration for Portable Native Client. |
| -void RegisterPnaclComponent(ComponentUpdateService* cus, |
| - const CommandLine& command_line); |
| +// Component installer responsible for Portable Native Client files. |
| +// Files can be installed to a shared location, or be installed to |
| +// a per-user location. |
| +class PnaclComponentInstaller : public ComponentInstaller { |
| + public: |
| + PnaclComponentInstaller(); |
| + |
| + virtual ~PnaclComponentInstaller(); |
| + |
| + virtual void OnUpdateError(int error) OVERRIDE; |
| + |
| + virtual bool Install(base::DictionaryValue* manifest, |
| + const base::FilePath& unpack_path) OVERRIDE; |
| + |
| + void RegisterPnaclComponent(ComponentUpdateService* cus, |
| + const CommandLine& command_line); |
| + |
| + // Check the PNaCl version again and re-register with the component |
| + // updater service. |
| + void ReRegisterPnacl(); |
| + |
| + bool per_user() const { return per_user_; } |
| + |
| + CrxComponent component() const { |
| + return pnacl_component_; |
| + } |
| + |
| + Version current_version() const { |
| + return pnacl_component_.version; |
| + } |
| + |
| + void set_current_version(const Version& ver) { |
| + pnacl_component_.version = ver; |
| + } |
| + |
| + private: |
| + bool per_user_; |
| + scoped_ptr<PnaclProfileObserver> profile_observer_; |
| + CrxComponent pnacl_component_; |
| + ComponentUpdateService* cus_; |
| +}; |
|
sky
2013/03/26 21:04:44
DISALLOW_...
jvoung (off chromium)
2013/03/26 21:33:34
Done.
|
| // Returns true if this browser is compatible with the given Pnacl component |
| // manifest, with the version specified in the manifest in |version_out|. |