OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 Operation operation() const { return operation_; } | 98 Operation operation() const { return operation_; } |
99 | 99 |
100 // A convenience method returning level() == SYSTEM_LEVEL. | 100 // A convenience method returning level() == SYSTEM_LEVEL. |
101 // TODO(grt): Eradicate the bool in favor of the enum. | 101 // TODO(grt): Eradicate the bool in favor of the enum. |
102 bool system_install() const; | 102 bool system_install() const; |
103 | 103 |
104 // A convenience method returning package_type() == MULTI_PACKAGE. | 104 // A convenience method returning package_type() == MULTI_PACKAGE. |
105 // TODO(grt): Eradicate the bool in favor of the enum. | 105 // TODO(grt): Eradicate the bool in favor of the enum. |
106 bool is_multi_install() const; | 106 bool is_multi_install() const; |
107 | 107 |
108 // Returns whether or not there is currently a Chrome Frame instance running. | |
109 // Note that there isn't a mechanism to lock Chrome Frame in place, so Chrome | |
110 // Frame may either exit or start up after this is called. | |
111 bool is_chrome_frame_running() const; | |
112 | |
108 // The full path to the place where the operand resides. | 113 // The full path to the place where the operand resides. |
109 const FilePath& target_path() const { return target_path_; } | 114 const FilePath& target_path() const { return target_path_; } |
110 | 115 |
111 // True if the "msi" preference is set or if a product with the "msi" state | 116 // True if the "msi" preference is set or if a product with the "msi" state |
112 // flag is set is to be operated on. | 117 // flag is set is to be operated on. |
113 bool is_msi() const { return msi_; } | 118 bool is_msi() const { return msi_; } |
114 | 119 |
115 // True if the --verbose-logging command-line flag is set or if the | 120 // True if the --verbose-logging command-line flag is set or if the |
116 // verbose_logging master preferences option is true. | 121 // verbose_logging master preferences option is true. |
117 bool verbose_logging() const { return verbose_logging_; } | 122 bool verbose_logging() const { return verbose_logging_; } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; | 188 FilePath GetDefaultProductInstallPath(BrowserDistribution* dist) const; |
184 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; | 189 bool CanAddProduct(const Product& product, const FilePath* product_dir) const; |
185 Product* AddProductInDirectory(const FilePath* product_dir, | 190 Product* AddProductInDirectory(const FilePath* product_dir, |
186 scoped_ptr<Product>* product); | 191 scoped_ptr<Product>* product); |
187 Product* AddProductFromPreferences( | 192 Product* AddProductFromPreferences( |
188 BrowserDistribution::Type distribution_type, | 193 BrowserDistribution::Type distribution_type, |
189 const MasterPreferences& prefs, | 194 const MasterPreferences& prefs, |
190 const InstallationState& machine_state); | 195 const InstallationState& machine_state); |
191 bool IsMultiInstallUpdate(const MasterPreferences& prefs, | 196 bool IsMultiInstallUpdate(const MasterPreferences& prefs, |
192 const InstallationState& machine_state); | 197 const InstallationState& machine_state); |
198 bool IsFileInUse(const FilePath& file); | |
grt (UTC plus 2)
2011/07/14 14:25:29
this can be static.
robertshield
2011/07/15 13:49:18
Done.
| |
199 bool DetectChromeFrameInUse(const InstallationState& machine_state); | |
193 | 200 |
194 // Sets this object's level and updates the root_key_ accordingly. | 201 // Sets this object's level and updates the root_key_ accordingly. |
195 void set_level(Level level); | 202 void set_level(Level level); |
196 | 203 |
197 // Sets this object's package type and updates the multi_package_distribution_ | 204 // Sets this object's package type and updates the multi_package_distribution_ |
198 // accordingly. | 205 // accordingly. |
199 void set_package_type(PackageType type); | 206 void set_package_type(PackageType type); |
200 | 207 |
201 Operation operation_; | 208 Operation operation_; |
202 FilePath target_path_; | 209 FilePath target_path_; |
203 std::wstring state_key_; | 210 std::wstring state_key_; |
204 BrowserDistribution::Type state_type_; | 211 BrowserDistribution::Type state_type_; |
205 ScopedVector<Product> products_; | 212 ScopedVector<Product> products_; |
206 BrowserDistribution* multi_package_distribution_; | 213 BrowserDistribution* multi_package_distribution_; |
207 Level level_; | 214 Level level_; |
208 PackageType package_type_; | 215 PackageType package_type_; |
209 #if defined(OS_WIN) | 216 #if defined(OS_WIN) |
210 HKEY root_key_; | 217 HKEY root_key_; |
211 #endif | 218 #endif |
212 bool msi_; | 219 bool msi_; |
213 bool verbose_logging_; | 220 bool verbose_logging_; |
221 bool is_chrome_frame_running_; | |
214 | 222 |
215 private: | 223 private: |
216 DISALLOW_COPY_AND_ASSIGN(InstallerState); | 224 DISALLOW_COPY_AND_ASSIGN(InstallerState); |
217 }; // class InstallerState | 225 }; // class InstallerState |
218 | 226 |
219 } // namespace installer | 227 } // namespace installer |
220 | 228 |
221 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ | 229 #endif // CHROME_INSTALLER_UTIL_INSTALLER_STATE_H_ |
OLD | NEW |