Chromium Code Reviews| 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/memory/scoped_ptr.h" | |
| 9 #include "chrome/browser/component_updater/component_updater_service.h" | |
| 10 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" | |
| 11 | |
| 12 | |
| 8 class CommandLine; | 13 class CommandLine; |
| 9 class ComponentUpdateService; | |
| 10 class Version; | 14 class Version; |
| 11 | 15 |
| 12 namespace base { | 16 namespace base { |
| 13 class DictionaryValue; | 17 class DictionaryValue; |
| 14 } | 18 } |
| 15 | 19 |
| 16 // Component update registration for Portable Native Client. | 20 class PnaclComponentInstaller : public ComponentInstaller { |
|
Dmitry Polukhin
2013/03/26 11:59:56
Nit, class comment would be nice.
jvoung - send to chromium...
2013/03/26 15:46:53
Done.
| |
| 17 void RegisterPnaclComponent(ComponentUpdateService* cus, | 21 public: |
| 18 const CommandLine& command_line); | 22 PnaclComponentInstaller(); |
| 23 | |
| 24 virtual ~PnaclComponentInstaller(); | |
| 25 | |
| 26 virtual void OnUpdateError(int error) OVERRIDE; | |
| 27 | |
| 28 virtual bool Install(base::DictionaryValue* manifest, | |
| 29 const base::FilePath& unpack_path) OVERRIDE; | |
| 30 | |
| 31 void RegisterPnaclComponent(ComponentUpdateService* cus, | |
| 32 const CommandLine& command_line); | |
| 33 | |
| 34 #if defined(OS_CHROMEOS) | |
|
Dmitry Polukhin
2013/03/26 11:59:56
Optional suggestion it looks like we can avoid all
jvoung - send to chromium...
2013/03/26 15:46:53
That's true, it would be more clear why the code i
| |
| 35 void ReRegisterPnacl(); | |
| 36 #endif | |
| 37 | |
| 38 CrxComponent get_component() { | |
| 39 return pnacl_component_; | |
| 40 } | |
| 41 | |
| 42 Version get_current_version() { | |
|
Dmitry Polukhin
2013/03/26 11:59:56
Nit, as far as know know getters should be without
jvoung - send to chromium...
2013/03/26 15:46:53
Done.
| |
| 43 return pnacl_component_.version; | |
| 44 } | |
| 45 | |
| 46 void set_current_version(const Version& ver) { | |
| 47 pnacl_component_.version = ver; | |
| 48 } | |
| 49 | |
| 50 private: | |
| 51 scoped_ptr<PnaclProfileObserver> profile_observer_; | |
| 52 CrxComponent pnacl_component_; | |
| 53 ComponentUpdateService* cus_; | |
| 54 }; | |
| 19 | 55 |
| 20 // Returns true if this browser is compatible with the given Pnacl component | 56 // Returns true if this browser is compatible with the given Pnacl component |
| 21 // manifest, with the version specified in the manifest in |version_out|. | 57 // manifest, with the version specified in the manifest in |version_out|. |
| 22 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, | 58 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, |
| 23 Version* version_out); | 59 Version* version_out); |
| 24 | 60 |
| 25 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 61 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
| OLD | NEW |