OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Returns the currently installed version in |target_path|, or NULL if no | 138 // Returns the currently installed version in |target_path|, or NULL if no |
139 // products are installed. Ownership is passed to the caller. | 139 // products are installed. Ownership is passed to the caller. |
140 Version* GetCurrentVersion(const InstallationState& machine_state) const; | 140 Version* GetCurrentVersion(const InstallationState& machine_state) const; |
141 | 141 |
142 // Returns the path to the installer under Chrome version folder | 142 // Returns the path to the installer under Chrome version folder |
143 // (for example <target_path>\Google\Chrome\Application\<Version>\Installer) | 143 // (for example <target_path>\Google\Chrome\Application\<Version>\Installer) |
144 FilePath GetInstallerDirectory(const Version& version) const; | 144 FilePath GetInstallerDirectory(const Version& version) const; |
145 | 145 |
146 // Try to delete all directories whose versions are lower than | 146 // Try to delete all directories whose versions are lower than |
147 // |latest_version|. | 147 // |latest_version|. |
148 void RemoveOldVersionDirectories(const Version& latest_version) const; | 148 void RemoveOldVersionDirectories(const Version& latest_version, |
| 149 const FilePath& temp_path) const; |
149 | 150 |
150 // Adds to |com_dll_list| the list of COM DLLs that are to be registered | 151 // Adds to |com_dll_list| the list of COM DLLs that are to be registered |
151 // and/or unregistered. The list may be empty. | 152 // and/or unregistered. The list may be empty. |
152 void AddComDllList(std::vector<FilePath>* com_dll_list) const; | 153 void AddComDllList(std::vector<FilePath>* com_dll_list) const; |
153 | 154 |
154 bool SetChannelFlags(bool set, ChannelInfo* channel_info) const; | 155 bool SetChannelFlags(bool set, ChannelInfo* channel_info) const; |
155 | 156 |
156 protected: | 157 protected: |
157 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; | 158 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; |
158 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; | 159 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; |
(...skipping 26 matching lines...) Expand all Loading... |
185 bool msi_; | 186 bool msi_; |
186 bool verbose_logging_; | 187 bool verbose_logging_; |
187 | 188 |
188 private: | 189 private: |
189 DISALLOW_COPY_AND_ASSIGN(InstallerState); | 190 DISALLOW_COPY_AND_ASSIGN(InstallerState); |
190 }; // class InstallerState | 191 }; // class InstallerState |
191 | 192 |
192 } // namespace installer | 193 } // namespace installer |
193 | 194 |
194 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ | 195 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
OLD | NEW |