OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CROS_COMPONENT_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_CROS_COMPONENT_INSTALLER_H_ |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_CROS_COMPONENT_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_CROS_COMPONENT_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 const std::string& name, | 99 const std::string& name, |
100 const update_client::Callback& install_callback); | 100 const update_client::Callback& install_callback); |
101 | 101 |
102 static void LoadCrOSComponent( | 102 static void LoadCrOSComponent( |
103 const std::string& name, | 103 const std::string& name, |
104 const base::Callback<void(const std::string&)>& mount_callback); | 104 const base::Callback<void(const std::string&)>& mount_callback); |
105 | 105 |
106 private: | 106 private: |
107 CrOSComponent() {} | 107 CrOSComponent() {} |
108 // Register a component. | 108 // Register a component. |
109 static void RegisterCrOSComponentInternal(ComponentUpdateService* cus, | 109 static void RegisterCrOSComponentInternal(const std::string& name, |
| 110 ComponentUpdateService* cus, |
110 const ComponentConfig& config, | 111 const ComponentConfig& config, |
111 const base::Closure& callback); | 112 const base::Closure& callback); |
112 // A helper function to pass into RegisterCrOSComonentInternal as a callback. | 113 // A helper function to pass into RegisterCrOSComonentInternal as a callback. |
113 // It calls OnDemandUpdate to install the component right after being | 114 // It calls OnDemandUpdate to install the component right after being |
114 // registered. | 115 // registered. |
115 static void InstallChromeOSComponent( | 116 static void InstallChromeOSComponent( |
116 ComponentUpdateService* cus, | 117 ComponentUpdateService* cus, |
117 const std::string& id, | 118 const std::string& id, |
118 const update_client::Callback& install_callback); | 119 const update_client::Callback& install_callback); |
119 }; | 120 }; |
120 #endif // defined(OS_CHROMEOS) | 121 #endif // defined(OS_CHROMEOS) |
121 | 122 |
122 } // namespace component_updater | 123 } // namespace component_updater |
123 | 124 |
124 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CROS_COMPONENT_INSTALLER_H_ | 125 #endif // CHROME_BROWSER_COMPONENT_UPDATER_CROS_COMPONENT_INSTALLER_H_ |
OLD | NEW |