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

Side by Side Diff: chrome/browser/component_updater/pnacl/pnacl_component_installer.h

Issue 15908002: Differential updates for components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync to LKGR revision 207804. Created 7 years, 6 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 <string>
9
10 #include "base/compiler_specific.h"
8 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "base/version.h" 13 #include "base/version.h"
11 #include "chrome/browser/component_updater/component_updater_service.h" 14 #include "chrome/browser/component_updater/component_updater_service.h"
12 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" 15 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h"
13 16
14 class CommandLine; 17 class CommandLine;
15 18
16 namespace base { 19 namespace base {
17 class DictionaryValue; 20 class DictionaryValue;
18 } 21 }
19 22
20 // Component installer responsible for Portable Native Client files. 23 // Component installer responsible for Portable Native Client files.
21 // Files can be installed to a shared location, or be installed to 24 // Files can be installed to a shared location, or be installed to
22 // a per-user location. 25 // a per-user location.
23 class PnaclComponentInstaller : public ComponentInstaller { 26 class PnaclComponentInstaller : public ComponentInstaller {
24 public: 27 public:
25 PnaclComponentInstaller(); 28 PnaclComponentInstaller();
26 29
27 virtual ~PnaclComponentInstaller(); 30 virtual ~PnaclComponentInstaller();
28 31
29 virtual void OnUpdateError(int error) OVERRIDE; 32 virtual void OnUpdateError(int error) OVERRIDE;
30 33
31 virtual bool Install(const base::DictionaryValue& manifest, 34 virtual bool Install(const base::DictionaryValue& manifest,
32 const base::FilePath& unpack_path) OVERRIDE; 35 const base::FilePath& unpack_path) OVERRIDE;
33 36
37 virtual bool GetInstalledFile(const std::string& file,
38 base::FilePath* installed_file) OVERRIDE;
39
34 // Register a PNaCl component for the first time. 40 // Register a PNaCl component for the first time.
35 void RegisterPnaclComponent(ComponentUpdateService* cus, 41 void RegisterPnaclComponent(ComponentUpdateService* cus,
36 const CommandLine& command_line); 42 const CommandLine& command_line);
37 43
38 // Check the PNaCl version again and re-register with the component 44 // Check the PNaCl version again and re-register with the component
39 // updater service. 45 // updater service.
40 void ReRegisterPnacl(); 46 void ReRegisterPnacl();
41 47
42 bool per_user() const { return per_user_; } 48 bool per_user() const { return per_user_; }
43 49
(...skipping 17 matching lines...) Expand all
61 ComponentUpdateService* cus_; 67 ComponentUpdateService* cus_;
62 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); 68 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller);
63 }; 69 };
64 70
65 // Returns true if this browser is compatible with the given Pnacl component 71 // Returns true if this browser is compatible with the given Pnacl component
66 // manifest, with the version specified in the manifest in |version_out|. 72 // manifest, with the version specified in the manifest in |version_out|.
67 bool CheckPnaclComponentManifest(const base::DictionaryValue& manifest, 73 bool CheckPnaclComponentManifest(const base::DictionaryValue& manifest,
68 base::Version* version_out); 74 base::Version* version_out);
69 75
70 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ 76 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698