OLD | NEW |
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/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/version.h" |
10 #include "chrome/browser/component_updater/component_updater_service.h" | 11 #include "chrome/browser/component_updater/component_updater_service.h" |
11 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" | 12 #include "chrome/browser/component_updater/pnacl/pnacl_profile_observer.h" |
12 | 13 |
13 class CommandLine; | 14 class CommandLine; |
14 class Version; | |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class DictionaryValue; | 17 class DictionaryValue; |
18 } | 18 } |
19 | 19 |
20 // Component installer responsible for Portable Native Client files. | 20 // Component installer responsible for Portable Native Client files. |
21 // Files can be installed to a shared location, or be installed to | 21 // Files can be installed to a shared location, or be installed to |
22 // a per-user location. | 22 // a per-user location. |
23 class PnaclComponentInstaller : public ComponentInstaller { | 23 class PnaclComponentInstaller : public ComponentInstaller { |
24 public: | 24 public: |
(...skipping 15 matching lines...) Expand all Loading... |
40 void ReRegisterPnacl(); | 40 void ReRegisterPnacl(); |
41 | 41 |
42 bool per_user() const { return per_user_; } | 42 bool per_user() const { return per_user_; } |
43 | 43 |
44 // If per_user, function to call when profile is changed. | 44 // If per_user, function to call when profile is changed. |
45 void OnProfileChange(); | 45 void OnProfileChange(); |
46 | 46 |
47 // Determine the base directory for storing each version of PNaCl. | 47 // Determine the base directory for storing each version of PNaCl. |
48 base::FilePath GetPnaclBaseDirectory(); | 48 base::FilePath GetPnaclBaseDirectory(); |
49 | 49 |
50 Version current_version() const { return current_version_; } | 50 base::Version current_version() const { return current_version_; } |
51 | 51 |
52 void set_current_version(const Version& v) { current_version_ = v; } | 52 void set_current_version(const base::Version& v) { current_version_ = v; } |
53 | 53 |
54 ComponentUpdateService* cus() const { return cus_; } | 54 ComponentUpdateService* cus() const { return cus_; } |
55 | 55 |
56 private: | 56 private: |
57 bool per_user_; | 57 bool per_user_; |
58 scoped_ptr<PnaclProfileObserver> profile_observer_; | 58 scoped_ptr<PnaclProfileObserver> profile_observer_; |
59 base::FilePath current_profile_path_; | 59 base::FilePath current_profile_path_; |
60 Version current_version_; | 60 base::Version current_version_; |
61 ComponentUpdateService* cus_; | 61 ComponentUpdateService* cus_; |
62 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); | 62 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); |
63 }; | 63 }; |
64 | 64 |
65 // Returns true if this browser is compatible with the given Pnacl component | 65 // Returns true if this browser is compatible with the given Pnacl component |
66 // manifest, with the version specified in the manifest in |version_out|. | 66 // manifest, with the version specified in the manifest in |version_out|. |
67 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, | 67 bool CheckPnaclComponentManifest(base::DictionaryValue* manifest, |
68 Version* version_out); | 68 base::Version* version_out); |
69 | 69 |
70 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 70 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
OLD | NEW |