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 28 matching lines...) Expand all Loading... |
39 // This method, if SHORTCUT_CREATE_ALWAYS is specified in |options|, creates | 39 // This method, if SHORTCUT_CREATE_ALWAYS is specified in |options|, creates |
40 // Start Menu shortcuts for all users or only for the current user depending on | 40 // Start Menu shortcuts for all users or only for the current user depending on |
41 // whether it is a system wide install or a user-level install. It also pins | 41 // whether it is a system wide install or a user-level install. It also pins |
42 // the browser shortcut to the current user's taskbar. | 42 // the browser shortcut to the current user's taskbar. |
43 // If SHORTCUT_CREATE_ALWAYS is not specified in |options|: this method only | 43 // If SHORTCUT_CREATE_ALWAYS is not specified in |options|: this method only |
44 // updates existing Start Menu shortcuts. | 44 // updates existing Start Menu shortcuts. |
45 // |setup_exe|: The path to the setup.exe stored in <version_dir>\Installer | 45 // |setup_exe|: The path to the setup.exe stored in <version_dir>\Installer |
46 // post-install. | 46 // post-install. |
47 // |options|: bitfield for which the options come from | 47 // |options|: bitfield for which the options come from |
48 // ShellUtil::ChromeShortcutOptions. | 48 // ShellUtil::ChromeShortcutOptions. |
49 void CreateOrUpdateStartMenuAndTaskbarShortcuts( | 49 // Returns true if all tasks succeed. |
| 50 bool CreateOrUpdateStartMenuAndTaskbarShortcuts( |
50 const InstallerState& installer_state, | 51 const InstallerState& installer_state, |
51 const FilePath& setup_exe, | 52 const FilePath& setup_exe, |
52 const Product& product, | 53 const Product& product, |
53 uint32 options); | 54 uint32 options); |
54 | 55 |
55 // This method, if SHORTCUT_CREATE_ALWAYS is specified in |options|, creates | 56 // This method, if SHORTCUT_CREATE_ALWAYS is specified in |options|, creates |
56 // Desktop and Quick Launch shortcuts for all users or only for the current user | 57 // Desktop and Quick Launch shortcuts for all users or only for the current user |
57 // depending on whether it is a system wide install or a user-level install. | 58 // depending on whether it is a system wide install or a user-level install. |
58 // If SHORTCUT_CREATE_ALWAYS is not specified in |options|: this method only | 59 // If SHORTCUT_CREATE_ALWAYS is not specified in |options|: this method only |
59 // updates existing shortcuts. | 60 // updates existing shortcuts. |
60 // |options|: bitfield for which the options come from | 61 // |options|: bitfield for which the options come from |
61 // ShellUtil::ChromeShortcutOptions. | 62 // ShellUtil::ChromeShortcutOptions. |
62 // If SHORTCUT_ALTERNATE is specified in |options|, an alternate shortcut name | 63 // If SHORTCUT_ALTERNATE is specified in |options|, an alternate shortcut name |
63 // is used for the Desktop shortcut. | 64 // is used for the Desktop shortcut. |
64 void CreateOrUpdateDesktopAndQuickLaunchShortcuts( | 65 // Returns true if all tasks succeed. |
| 66 bool CreateOrUpdateDesktopAndQuickLaunchShortcuts( |
65 const InstallerState& installer_state, | 67 const InstallerState& installer_state, |
66 const Product& product, | 68 const Product& product, |
67 uint32 options); | 69 uint32 options); |
68 | 70 |
69 // Registers Chrome on this machine. | 71 // Registers Chrome on this machine. |
70 // If |make_chrome_default|, also attempts to make Chrome default (potentially | 72 // If |make_chrome_default|, also attempts to make Chrome default (potentially |
71 // popping a UAC if the user is not an admin and HKLM registrations are required | 73 // popping a UAC if the user is not an admin and HKLM registrations are required |
72 // to register Chrome's capabilities on this version of Windows (i.e. | 74 // to register Chrome's capabilities on this version of Windows (i.e. |
73 // pre-Win8)). | 75 // pre-Win8)). |
74 void RegisterChromeOnMachine(const InstallerState& installer_state, | 76 // Returns true if all tasks succeed. |
| 77 bool RegisterChromeOnMachine(const InstallerState& installer_state, |
75 const Product& product, | 78 const Product& product, |
76 bool make_chrome_default); | 79 bool make_chrome_default); |
77 | 80 |
78 // This function installs or updates a new version of Chrome. It returns | 81 // This function installs or updates a new version of Chrome. It returns |
79 // install status (failed, new_install, updated etc). | 82 // install status (failed, new_install, updated etc). |
80 // | 83 // |
81 // setup_path: Path to the executable (setup.exe) as it will be copied | 84 // setup_path: Path to the executable (setup.exe) as it will be copied |
82 // to Chrome install folder after install is complete | 85 // to Chrome install folder after install is complete |
83 // archive_path: Path to the archive (chrome.7z) as it will be copied | 86 // archive_path: Path to the archive (chrome.7z) as it will be copied |
84 // to Chrome install folder after install is complete | 87 // to Chrome install folder after install is complete |
(...skipping 10 matching lines...) Expand all Loading... |
95 InstallStatus InstallOrUpdateProduct( | 98 InstallStatus InstallOrUpdateProduct( |
96 const InstallationState& original_state, | 99 const InstallationState& original_state, |
97 const InstallerState& installer_state, | 100 const InstallerState& installer_state, |
98 const FilePath& setup_path, | 101 const FilePath& setup_path, |
99 const FilePath& archive_path, | 102 const FilePath& archive_path, |
100 const FilePath& install_temp_path, | 103 const FilePath& install_temp_path, |
101 const FilePath& prefs_path, | 104 const FilePath& prefs_path, |
102 const installer::MasterPreferences& prefs, | 105 const installer::MasterPreferences& prefs, |
103 const Version& new_version); | 106 const Version& new_version); |
104 | 107 |
| 108 // Performs installation-related tasks following an OS upgrade. |
| 109 // Returns true if all tasks succeed. |
| 110 bool HandleOsUpgradeForBrowser(const InstallerState& installer_state, |
| 111 const Product& chrome, |
| 112 const FilePath& setup_exe); |
| 113 |
105 } // namespace installer | 114 } // namespace installer |
106 | 115 |
107 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ | 116 #endif // CHROME_INSTALLER_SETUP_INSTALL_H_ |
OLD | NEW |