| 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 <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 class ComponentUpdateService; | 35 class ComponentUpdateService; |
| 36 | 36 |
| 37 // Component installer responsible for Portable Native Client files. | 37 // Component installer responsible for Portable Native Client files. |
| 38 // Files can be installed to a shared location, or be installed to | 38 // Files can be installed to a shared location, or be installed to |
| 39 // a per-user location. | 39 // a per-user location. |
| 40 class PnaclComponentInstaller : public update_client::ComponentInstaller { | 40 class PnaclComponentInstaller : public update_client::ComponentInstaller { |
| 41 public: | 41 public: |
| 42 PnaclComponentInstaller(); | 42 PnaclComponentInstaller(); |
| 43 | 43 |
| 44 ~PnaclComponentInstaller() override; | 44 // ComponentInstaller implementation: |
| 45 | |
| 46 void OnUpdateError(int error) override; | 45 void OnUpdateError(int error) override; |
| 47 | 46 |
| 48 bool Install(const base::DictionaryValue& manifest, | 47 bool Install(const base::DictionaryValue& manifest, |
| 49 const base::FilePath& unpack_path) override; | 48 const base::FilePath& unpack_path) override; |
| 50 | 49 |
| 51 bool GetInstalledFile(const std::string& file, | 50 bool GetInstalledFile(const std::string& file, |
| 52 base::FilePath* installed_file) override; | 51 base::FilePath* installed_file) override; |
| 53 | 52 |
| 54 // Register a PNaCl component for the first time. | 53 // Register a PNaCl component for the first time. |
| 55 void RegisterPnaclComponent(ComponentUpdateService* cus); | 54 void RegisterPnaclComponent(ComponentUpdateService* cus); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 67 | 66 |
| 68 std::string current_fingerprint() const { return current_fingerprint_; } | 67 std::string current_fingerprint() const { return current_fingerprint_; } |
| 69 | 68 |
| 70 void set_current_fingerprint(const std::string& current_fingerprint) { | 69 void set_current_fingerprint(const std::string& current_fingerprint) { |
| 71 current_fingerprint_ = current_fingerprint; | 70 current_fingerprint_ = current_fingerprint; |
| 72 } | 71 } |
| 73 | 72 |
| 74 ComponentUpdateService* cus() const { return cus_; } | 73 ComponentUpdateService* cus() const { return cus_; } |
| 75 | 74 |
| 76 private: | 75 private: |
| 76 ~PnaclComponentInstaller() override; |
| 77 |
| 77 base::Version current_version_; | 78 base::Version current_version_; |
| 78 std::string current_fingerprint_; | 79 std::string current_fingerprint_; |
| 79 ComponentUpdateService* cus_; | 80 ComponentUpdateService* cus_; |
| 81 |
| 80 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); | 82 DISALLOW_COPY_AND_ASSIGN(PnaclComponentInstaller); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace component_updater | 85 } // namespace component_updater |
| 84 | 86 |
| 85 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ | 87 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PNACL_PNACL_COMPONENT_INSTALLER_H_ |
| OLD | NEW |