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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698