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