| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This file contains the specification of setup main functions. | 5 // This file contains the specification of setup main functions. |
| 6 | 6 |
| 7 #ifndef CHROME_INSTALLER_SETUP_INSTALL_H_ | 7 #ifndef CHROME_INSTALLER_SETUP_INSTALL_H_ |
| 8 #define CHROME_INSTALLER_SETUP_INSTALL_H_ | 8 #define CHROME_INSTALLER_SETUP_INSTALL_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <base/values.h> |
| 11 #include <windows.h> | |
| 12 | 11 |
| 13 #include "chrome/installer/util/util_constants.h" | 12 #include "chrome/installer/util/util_constants.h" |
| 14 #include "chrome/installer/util/version.h" | 13 #include "chrome/installer/util/version.h" |
| 15 | 14 |
| 16 namespace installer { | 15 namespace installer { |
| 17 // Get path to the installer under Chrome version folder | 16 // Get path to the installer under Chrome version folder |
| 18 // (for example <path>\Google\Chrome\<Version>\installer) | 17 // (for example <path>\Google\Chrome\<Version>\installer) |
| 19 std::wstring GetInstallerPathUnderChrome(const std::wstring& install_path, | 18 std::wstring GetInstallerPathUnderChrome(const std::wstring& install_path, |
| 20 const std::wstring& new_version); | 19 const std::wstring& new_version); |
| 21 | 20 |
| 22 // This function installs or updates a new version of Chrome. It returns | 21 // This function installs or updates a new version of Chrome. It returns |
| 23 // install status (failed, new_install, updated etc). | 22 // install status (failed, new_install, updated etc). |
| 24 // | 23 // |
| 25 // exe_path: Path to the executable (setup.exe) as it will be copied | 24 // exe_path: Path to the executable (setup.exe) as it will be copied |
| 26 // to Chrome install folder after install is complete | 25 // to Chrome install folder after install is complete |
| 27 // archive_path: Path to the archive (chrome.7z) as it will be copied | 26 // archive_path: Path to the archive (chrome.7z) as it will be copied |
| 28 // to Chrome install folder after install is complete | 27 // to Chrome install folder after install is complete |
| 29 // install_temp_path: working directory used during install/update. It should | 28 // install_temp_path: working directory used during install/update. It should |
| 30 // also has a sub dir source that contains a complete | 29 // also has a sub dir source that contains a complete |
| 31 // and unpacked Chrome package. | 30 // and unpacked Chrome package. |
| 32 // options: install options. See chrome/installer/util/util_constants.h. | 31 // prefs: master preferences. See chrome/installer/util/master_preferences.h. |
| 33 // new_version: new Chrome version that needs to be installed | 32 // new_version: new Chrome version that needs to be installed |
| 34 // installed_version: currently installed version of Chrome, if any, or | 33 // installed_version: currently installed version of Chrome, if any, or |
| 35 // NULL otherwise | 34 // NULL otherwise |
| 36 // | 35 // |
| 37 // Note: since caller unpacks Chrome to install_temp_path\source, the caller | 36 // Note: since caller unpacks Chrome to install_temp_path\source, the caller |
| 38 // is responsible for cleaning up install_temp_path. | 37 // is responsible for cleaning up install_temp_path. |
| 39 installer_util::InstallStatus InstallOrUpdateChrome( | 38 installer_util::InstallStatus InstallOrUpdateChrome( |
| 40 const std::wstring& exe_path, const std::wstring& archive_path, | 39 const std::wstring& exe_path, const std::wstring& archive_path, |
| 41 const std::wstring& install_temp_path, int options, | 40 const std::wstring& install_temp_path, const DictionaryValue* prefs, |
| 42 const Version& new_version, const Version* installed_version); | 41 const Version& new_version, const Version* installed_version); |
| 43 | 42 |
| 44 // This function installs a new version of Chrome to the specified location. | 43 // This function installs a new version of Chrome to the specified location. |
| 45 // It returns true if install was successful and false in case of an error. | 44 // It returns true if install was successful and false in case of an error. |
| 46 // | 45 // |
| 47 // exe_path: Path to the executable (setup.exe) as it will be copied | 46 // exe_path: Path to the executable (setup.exe) as it will be copied |
| 48 // to Chrome install folder after install is complete | 47 // to Chrome install folder after install is complete |
| 49 // archive_path: Path to the archive (chrome.7z) as it will be copied | 48 // archive_path: Path to the archive (chrome.7z) as it will be copied |
| 50 // to Chrome install folder after install is complete | 49 // to Chrome install folder after install is complete |
| 51 // src_path: the path that contains a complete and unpacked Chrome package | 50 // src_path: the path that contains a complete and unpacked Chrome package |
| (...skipping 17 matching lines...) Expand all Loading... |
| 69 const std::wstring& archive_path, | 68 const std::wstring& archive_path, |
| 70 const std::wstring& src_path, | 69 const std::wstring& src_path, |
| 71 const std::wstring& install_path, | 70 const std::wstring& install_path, |
| 72 const std::wstring& temp_dir, | 71 const std::wstring& temp_dir, |
| 73 const HKEY reg_root, | 72 const HKEY reg_root, |
| 74 const Version& new_version); | 73 const Version& new_version); |
| 75 | 74 |
| 76 } | 75 } |
| 77 | 76 |
| 78 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ | 77 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ |
| OLD | NEW |