| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| 6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Verifies that a working installation resides within the directory specified | 40 // Verifies that a working installation resides within the directory specified |
| 41 // by |install_dir|. |install_dir| is of the form <base directory>/<version>. | 41 // by |install_dir|. |install_dir| is of the form <base directory>/<version>. |
| 42 // |manifest| should have been read from the manifest file in |install_dir|. | 42 // |manifest| should have been read from the manifest file in |install_dir|. |
| 43 // Called only from a thread belonging to a blocking thread pool. | 43 // Called only from a thread belonging to a blocking thread pool. |
| 44 // The implementation of this function must be efficient since the function | 44 // The implementation of this function must be efficient since the function |
| 45 // can be called when Chrome starts. | 45 // can be called when Chrome starts. |
| 46 virtual bool VerifyInstallation(const base::DictionaryValue& manifest, | 46 virtual bool VerifyInstallation(const base::DictionaryValue& manifest, |
| 47 const base::FilePath& install_dir) const = 0; | 47 const base::FilePath& install_dir) const = 0; |
| 48 | 48 |
| 49 // Returns true if the component can be automatically updated. Called once | 49 // Returns true if the component supports a group policy to enable updates. |
| 50 // during component registration from the UI thread. | 50 // Called once during component registration from the UI thread. |
| 51 virtual bool CanAutoUpdate() const = 0; | 51 virtual bool SupportsGroupPolicyEnabledComponentUpdates() const = 0; |
| 52 | 52 |
| 53 // Returns true if the network communication related to this component | 53 // Returns true if the network communication related to this component |
| 54 // must be encrypted. | 54 // must be encrypted. |
| 55 virtual bool RequiresNetworkEncryption() const = 0; | 55 virtual bool RequiresNetworkEncryption() const = 0; |
| 56 | 56 |
| 57 // OnCustomInstall is called during the installation process. Components that | 57 // OnCustomInstall is called during the installation process. Components that |
| 58 // require custom installation operations should implement them here. | 58 // require custom installation operations should implement them here. |
| 59 // Returns false if a custom operation failed, and true otherwise. | 59 // Returns false if a custom operation failed, and true otherwise. |
| 60 // Called only from a thread belonging to a blocking thread pool. | 60 // Called only from a thread belonging to a blocking thread pool. |
| 61 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, | 61 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 151 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 152 | 152 |
| 153 base::ThreadChecker thread_checker_; | 153 base::ThreadChecker thread_checker_; |
| 154 | 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); | 155 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace component_updater | 158 } // namespace component_updater |
| 159 | 159 |
| 160 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 160 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| OLD | NEW |