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

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: cleanup 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
sky 2013/03/26 21:04:44 nit: remove one of these newlines.
jvoung (off chromium) 2013/03/26 21:33:34 Done.
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 // Component installer responsible for Portable Native Client files.
17 void RegisterPnaclComponent(ComponentUpdateService* cus, 21 // Files can be installed to a shared location, or be installed to
18 const CommandLine& command_line); 22 // a per-user location.
23 class PnaclComponentInstaller : public ComponentInstaller {
24 public:
25 PnaclComponentInstaller();
26
27 virtual ~PnaclComponentInstaller();
28
29 virtual void OnUpdateError(int error) OVERRIDE;
30
31 virtual bool Install(base::DictionaryValue* manifest,
32 const base::FilePath& unpack_path) OVERRIDE;
33
34 void RegisterPnaclComponent(ComponentUpdateService* cus,
35 const CommandLine& command_line);
36
37 // Check the PNaCl version again and re-register with the component
38 // updater service.
39 void ReRegisterPnacl();
40
41 bool per_user() const { return per_user_; }
42
43 CrxComponent component() const {
44 return pnacl_component_;
45 }
46
47 Version current_version() const {
48 return pnacl_component_.version;
49 }
50
51 void set_current_version(const Version& ver) {
52 pnacl_component_.version = ver;
53 }
54
55 private:
56 bool per_user_;
57 scoped_ptr<PnaclProfileObserver> profile_observer_;
58 CrxComponent pnacl_component_;
59 ComponentUpdateService* cus_;
60 };
sky 2013/03/26 21:04:44 DISALLOW_...
jvoung (off chromium) 2013/03/26 21:33:34 Done.
19 61
20 // Returns true if this browser is compatible with the given Pnacl component 62 // Returns true if this browser is compatible with the given Pnacl component
21 // manifest, with the version specified in the manifest in |version_out|. 63 // manifest, with the version specified in the manifest in |version_out|.
22 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, 64 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest,
23 Version* version_out); 65 Version* version_out);
24 66
25 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ 67 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698