OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DEFAULT_COMPONENT_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 explicit DefaultComponentInstaller( | 79 explicit DefaultComponentInstaller( |
80 scoped_ptr<ComponentInstallerTraits> installer_traits); | 80 scoped_ptr<ComponentInstallerTraits> installer_traits); |
81 | 81 |
82 // Registers the component for update checks and installs. | 82 // Registers the component for update checks and installs. |
83 void Register(ComponentUpdateService* cus); | 83 void Register(ComponentUpdateService* cus); |
84 | 84 |
85 // Overridden from ComponentInstaller: | 85 // Overridden from ComponentInstaller: |
86 virtual void OnUpdateError(int error) OVERRIDE; | 86 virtual void OnUpdateError(int error) OVERRIDE; |
87 virtual bool Install(const base::DictionaryValue& manifest, | 87 virtual bool Install(const base::DictionaryValue& manifest, |
88 const base::FilePath& unpack_path) OVERRIDE; | 88 const base::FilePath& unpack_path) OVERRIDE; |
| 89 virtual base::FilePath GetBackupPath() const OVERRIDE; |
| 90 virtual void InstallExternally() OVERRIDE; |
89 virtual bool GetInstalledFile(const std::string& file, | 91 virtual bool GetInstalledFile(const std::string& file, |
90 base::FilePath* installed_file) OVERRIDE; | 92 base::FilePath* installed_file) OVERRIDE; |
91 | 93 |
92 virtual ~DefaultComponentInstaller(); | 94 virtual ~DefaultComponentInstaller(); |
93 | 95 |
94 private: | 96 private: |
95 base::FilePath GetInstallDirectory(); | 97 base::FilePath GetInstallDirectory(); |
96 bool InstallHelper(const base::DictionaryValue& manifest, | 98 bool InstallHelper(const base::DictionaryValue& manifest, |
97 const base::FilePath& unpack_path, | 99 const base::FilePath& unpack_path, |
98 const base::FilePath& install_path); | 100 const base::FilePath& install_path); |
99 void StartRegistration(ComponentUpdateService* cus); | 101 void StartRegistration(ComponentUpdateService* cus); |
100 void FinishRegistration(ComponentUpdateService* cus); | 102 void FinishRegistration(ComponentUpdateService* cus); |
101 | 103 |
102 base::Version current_version_; | 104 base::Version current_version_; |
103 std::string current_fingerprint_; | 105 std::string current_fingerprint_; |
104 scoped_ptr<base::DictionaryValue> current_manifest_; | 106 scoped_ptr<base::DictionaryValue> current_manifest_; |
105 scoped_ptr<ComponentInstallerTraits> installer_traits_; | 107 scoped_ptr<ComponentInstallerTraits> installer_traits_; |
106 | 108 |
107 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); | 109 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); |
108 }; | 110 }; |
109 | 111 |
110 } // namespace component_updater | 112 } // namespace component_updater |
111 | 113 |
112 #endif // CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 114 #endif // CHROME_BROWSER_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
OLD | NEW |