| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Update. The InstallerResult value is set to 0 (SUCCESS) or 1 | 198 // Update. The InstallerResult value is set to 0 (SUCCESS) or 1 |
| 199 // (FAILED_CUSTOM_ERROR) depending on whether |status| maps to success or not. | 199 // (FAILED_CUSTOM_ERROR) depending on whether |status| maps to success or not. |
| 200 // |status| itself is written to the InstallerError value. | 200 // |status| itself is written to the InstallerError value. |
| 201 // |string_resource_id|, if non-zero, identifies a localized string written to | 201 // |string_resource_id|, if non-zero, identifies a localized string written to |
| 202 // the InstallerResultUIString value. |launch_cmd|, if non-NULL and | 202 // the InstallerResultUIString value. |launch_cmd|, if non-NULL and |
| 203 // non-empty, is written to the InstallerSuccessLaunchCmdLine value. | 203 // non-empty, is written to the InstallerSuccessLaunchCmdLine value. |
| 204 void WriteInstallerResult(InstallStatus status, | 204 void WriteInstallerResult(InstallStatus status, |
| 205 int string_resource_id, | 205 int string_resource_id, |
| 206 const std::wstring* launch_cmd) const; | 206 const std::wstring* launch_cmd) const; |
| 207 | 207 |
| 208 // Returns true if this install needs to register an Active Setup command. |
| 209 bool RequiresActiveSetup() const; |
| 210 |
| 208 protected: | 211 protected: |
| 209 // Returns true if |file| exists and cannot be opened for exclusive write | 212 // Returns true if |file| exists and cannot be opened for exclusive write |
| 210 // access. | 213 // access. |
| 211 static bool IsFileInUse(const FilePath& file); | 214 static bool IsFileInUse(const FilePath& file); |
| 212 | 215 |
| 213 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; | 216 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; |
| 214 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; | 217 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; |
| 215 Product* AddProductInDirectory(const FilePath* product_dir, | 218 Product* AddProductInDirectory(const FilePath* product_dir, |
| 216 scoped_ptr<Product>* product); | 219 scoped_ptr<Product>* product); |
| 217 Product* AddProductFromPreferences( | 220 Product* AddProductFromPreferences( |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 bool verbose_logging_; | 252 bool verbose_logging_; |
| 250 bool ensure_google_update_present_; | 253 bool ensure_google_update_present_; |
| 251 | 254 |
| 252 private: | 255 private: |
| 253 DISALLOW_COPY_AND_ASSIGN(InstallerState); | 256 DISALLOW_COPY_AND_ASSIGN(InstallerState); |
| 254 }; // class InstallerState | 257 }; // class InstallerState |
| 255 | 258 |
| 256 } // namespace installer | 259 } // namespace installer |
| 257 | 260 |
| 258 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ | 261 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
| OLD | NEW |