| 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 // 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 <vector> | 10 #include <vector> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Escape |att_value| as per the XML AttValue production | 65 // Escape |att_value| as per the XML AttValue production |
| 66 // (http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue) for a value in | 66 // (http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue) for a value in |
| 67 // single quotes. | 67 // single quotes. |
| 68 void EscapeXmlAttributeValueInSingleQuotes(base::string16* att_value); | 68 void EscapeXmlAttributeValueInSingleQuotes(base::string16* att_value); |
| 69 | 69 |
| 70 // Creates VisualElementsManifest.xml beside chrome.exe in |src_path| if | 70 // Creates VisualElementsManifest.xml beside chrome.exe in |src_path| if |
| 71 // |src_path|\VisualElements exists. | 71 // |src_path|\VisualElements exists. |
| 72 // Returns true unless the manifest is supposed to be created, but fails to be. | 72 // Returns true unless the manifest is supposed to be created, but fails to be. |
| 73 bool CreateVisualElementsManifest(const base::FilePath& src_path, | 73 bool CreateVisualElementsManifest(const base::FilePath& src_path, |
| 74 const Version& version); | 74 const base::Version& version); |
| 75 | 75 |
| 76 // Overwrites shortcuts (desktop, quick launch, and start menu) if they are | 76 // Overwrites shortcuts (desktop, quick launch, and start menu) if they are |
| 77 // present on the system. | 77 // present on the system. |
| 78 // |prefs| can affect the behavior of this method through | 78 // |prefs| can affect the behavior of this method through |
| 79 // kDoNotCreateDesktopShortcut, kDoNotCreateQuickLaunchShortcut, and | 79 // kDoNotCreateDesktopShortcut, kDoNotCreateQuickLaunchShortcut, and |
| 80 // kAltShortcutText. | 80 // kAltShortcutText. |
| 81 // |install_level| specifies whether to install per-user shortcuts or shortcuts | 81 // |install_level| specifies whether to install per-user shortcuts or shortcuts |
| 82 // for all users on the system (this should only be used to update legacy | 82 // for all users on the system (this should only be used to update legacy |
| 83 // system-level installs). | 83 // system-level installs). |
| 84 // If |install_operation| is a creation command, appropriate shortcuts will be | 84 // If |install_operation| is a creation command, appropriate shortcuts will be |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // is responsible for cleaning up install_temp_path. | 120 // is responsible for cleaning up install_temp_path. |
| 121 InstallStatus InstallOrUpdateProduct( | 121 InstallStatus InstallOrUpdateProduct( |
| 122 const InstallationState& original_state, | 122 const InstallationState& original_state, |
| 123 const InstallerState& installer_state, | 123 const InstallerState& installer_state, |
| 124 const base::FilePath& setup_path, | 124 const base::FilePath& setup_path, |
| 125 const base::FilePath& archive_path, | 125 const base::FilePath& archive_path, |
| 126 const base::FilePath& install_temp_path, | 126 const base::FilePath& install_temp_path, |
| 127 const base::FilePath& src_path, | 127 const base::FilePath& src_path, |
| 128 const base::FilePath& prefs_path, | 128 const base::FilePath& prefs_path, |
| 129 const installer::MasterPreferences& prefs, | 129 const installer::MasterPreferences& prefs, |
| 130 const Version& new_version); | 130 const base::Version& new_version); |
| 131 | 131 |
| 132 // Performs installation-related tasks following an OS upgrade. | 132 // Performs installation-related tasks following an OS upgrade. |
| 133 // |chrome| The installed product (must be a browser). | 133 // |chrome| The installed product (must be a browser). |
| 134 // |installed_version| the current version of this install. | 134 // |installed_version| the current version of this install. |
| 135 void HandleOsUpgradeForBrowser(const InstallerState& installer_state, | 135 void HandleOsUpgradeForBrowser(const InstallerState& installer_state, |
| 136 const Product& chrome, | 136 const Product& chrome, |
| 137 const base::Version& installed_version); | 137 const base::Version& installed_version); |
| 138 | 138 |
| 139 // Performs per-user installation-related tasks on Active Setup (ran on first | 139 // Performs per-user installation-related tasks on Active Setup (ran on first |
| 140 // login for each user post system-level Chrome install). | 140 // login for each user post system-level Chrome install). |
| 141 // |installation_root|: The root of this install (i.e. the directory in which | 141 // |installation_root|: The root of this install (i.e. the directory in which |
| 142 // chrome.exe is installed). | 142 // chrome.exe is installed). |
| 143 // Shortcut creation is skipped if the First Run beacon is present (unless | 143 // Shortcut creation is skipped if the First Run beacon is present (unless |
| 144 // |force| is set to true). | 144 // |force| is set to true). |
| 145 // |chrome| The installed product (must be a browser). | 145 // |chrome| The installed product (must be a browser). |
| 146 void HandleActiveSetupForBrowser(const base::FilePath& installation_root, | 146 void HandleActiveSetupForBrowser(const base::FilePath& installation_root, |
| 147 const Product& chrome, | 147 const Product& chrome, |
| 148 bool force); | 148 bool force); |
| 149 | 149 |
| 150 } // namespace installer | 150 } // namespace installer |
| 151 | 151 |
| 152 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ | 152 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ |
| OLD | NEW |