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

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

Powered by Google App Engine
This is Rietveld 408576698