Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: chrome/browser/component_updater/pnacl/pnacl_component_installer.h

Issue 13071002: Turn on component updater on chromeos, only for the pnacl component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check if logged in first to not waste early ping on the OTR profile Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..7050ccc021ccddcf147a435f45e47a8f751fb8f2 100644
--- a/chrome/browser/component_updater/pnacl/pnacl_component_installer.h
+++ b/chrome/browser/component_updater/pnacl/pnacl_component_installer.h
@@ -5,17 +5,53 @@
#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"
+
+
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);
+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.
+ 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);
+
+#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
+ void ReRegisterPnacl();
+#endif
+
+ CrxComponent get_component() {
+ return pnacl_component_;
+ }
+
+ 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.
+ return pnacl_component_.version;
+ }
+
+ void set_current_version(const Version& ver) {
+ pnacl_component_.version = ver;
+ }
+
+ private:
+ scoped_ptr<PnaclProfileObserver> profile_observer_;
+ CrxComponent pnacl_component_;
+ ComponentUpdateService* cus_;
+};
// Returns true if this browser is compatible with the given Pnacl component
// manifest, with the version specified in the manifest in |version_out|.

Powered by Google App Engine
This is Rietveld 408576698