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_INSTALLER_UTIL_INSTALLER_STATE_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
6 #define CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ | 6 #define CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 bool SetChannelFlags(bool set, ChannelInfo* channel_info) const; | 162 bool SetChannelFlags(bool set, ChannelInfo* channel_info) const; |
163 | 163 |
164 // See InstallUtil::UpdateInstallerStage. | 164 // See InstallUtil::UpdateInstallerStage. |
165 void UpdateStage(installer::InstallerStage stage) const; | 165 void UpdateStage(installer::InstallerStage stage) const; |
166 | 166 |
167 // For a MULTI_INSTALL or MULTI_UPDATE operation, updates the Google Update | 167 // For a MULTI_INSTALL or MULTI_UPDATE operation, updates the Google Update |
168 // "ap" values for all products being operated on. | 168 // "ap" values for all products being operated on. |
169 void UpdateChannels() const; | 169 void UpdateChannels() const; |
170 | 170 |
| 171 // Sets installer result information in the registry for consumption by Google |
| 172 // Update. The InstallerResult value is set to 0 (SUCCESS) or 1 |
| 173 // (FAILED_CUSTOM_ERROR) depending on whether |status| maps to success or not. |
| 174 // |status| itself is written to the InstallerError value. |
| 175 // |string_resource_id|, if non-zero, identifies a localized string written to |
| 176 // the InstallerResultUIString value. |launch_cmd|, if non-NULL and |
| 177 // non-empty, is written to the InstallerSuccessLaunchCmdLine value. |
| 178 void WriteInstallerResult(InstallStatus status, |
| 179 int string_resource_id, |
| 180 const std::wstring* launch_cmd) const; |
| 181 |
171 protected: | 182 protected: |
172 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; | 183 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; |
173 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; | 184 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; |
174 Product* AddProductInDirectory(const FilePath* product_dir, | 185 Product* AddProductInDirectory(const FilePath* product_dir, |
175 scoped_ptr<Product>* product); | 186 scoped_ptr<Product>* product); |
176 Product* AddProductFromPreferences( | 187 Product* AddProductFromPreferences( |
177 BrowserDistribution::Type distribution_type, | 188 BrowserDistribution::Type distribution_type, |
178 const MasterPreferences& prefs, | 189 const MasterPreferences& prefs, |
179 const InstallationState& machine_state); | 190 const InstallationState& machine_state); |
180 bool IsMultiInstallUpdate(const MasterPreferences& prefs, | 191 bool IsMultiInstallUpdate(const MasterPreferences& prefs, |
(...skipping 20 matching lines...) Expand all Loading... |
201 bool msi_; | 212 bool msi_; |
202 bool verbose_logging_; | 213 bool verbose_logging_; |
203 | 214 |
204 private: | 215 private: |
205 DISALLOW_COPY_AND_ASSIGN(InstallerState); | 216 DISALLOW_COPY_AND_ASSIGN(InstallerState); |
206 }; // class InstallerState | 217 }; // class InstallerState |
207 | 218 |
208 } // namespace installer | 219 } // namespace installer |
209 | 220 |
210 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ | 221 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
OLD | NEW |