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

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: review Created 7 years, 8 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
8 class CommandLine; 12 class CommandLine;
9 class ComponentUpdateService;
10 class Version; 13 class Version;
11 14
12 namespace base { 15 namespace base {
13 class DictionaryValue; 16 class DictionaryValue;
14 } 17 }
15 18
16 // Component update registration for Portable Native Client. 19 // Component installer responsible for Portable Native Client files.
17 void RegisterPnaclComponent(ComponentUpdateService* cus, 20 // Files can be installed to a shared location, or be installed to
18 const CommandLine& command_line); 21 // a per-user location.
22 class PnaclComponentInstaller : public ComponentInstaller {
23 public:
24 PnaclComponentInstaller();
25
26 virtual ~PnaclComponentInstaller();
27
28 virtual void OnUpdateError(int error) OVERRIDE;
29
30 virtual bool Install(base::DictionaryValue* manifest,
31 const base::FilePath& unpack_path) OVERRIDE;
32
33 void RegisterPnaclComponent(ComponentUpdateService* cus,
34 const CommandLine& command_line);
35
36 // Check the PNaCl version again and re-register with the component
37 // updater service.
38 void ReRegisterPnacl();
39
40 bool per_user() const { return per_user_; }
41
42 Version current_version() const { return current_version_; }
43
44 void set_current_version(const Version& v) { current_version_ = v; }
45
46 private:
47 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller);
48 bool per_user_;
49 scoped_ptr<PnaclProfileObserver> profile_observer_;
50 Version current_version_;
51 ComponentUpdateService* cus_;
52 };
19 53
20 // Returns true if this browser is compatible with the given Pnacl component 54 // Returns true if this browser is compatible with the given Pnacl component
21 // manifest, with the version specified in the manifest in |version_out|. 55 // manifest, with the version specified in the manifest in |version_out|.
22 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, 56 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest,
23 Version* version_out); 57 Version* version_out);
24 58
25 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ 59 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698