| 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 declares utility functions for the installer. The original reason | 5 // This file declares utility functions for the installer. The original reason |
| 6 // for putting these functions in installer\util library is so that we can | 6 // for putting these functions in installer\util library is so that we can |
| 7 // separate out the critical logic and write unit tests for it. | 7 // separate out the critical logic and write unit tests for it. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 10 #define CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // Returns true if the installation represented by the pair of |dist| and | 83 // Returns true if the installation represented by the pair of |dist| and |
| 84 // |system_level| is a multi install. | 84 // |system_level| is a multi install. |
| 85 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); | 85 static bool IsMultiInstall(BrowserDistribution* dist, bool system_install); |
| 86 | 86 |
| 87 // Returns true if this is running setup process for Chrome SxS (as | 87 // Returns true if this is running setup process for Chrome SxS (as |
| 88 // indicated by the presence of --chrome-sxs on the command line) or if this | 88 // indicated by the presence of --chrome-sxs on the command line) or if this |
| 89 // is running Chrome process from the Chrome SxS installation (as indicated | 89 // is running Chrome process from the Chrome SxS installation (as indicated |
| 90 // by either --chrome-sxs or the executable path). | 90 // by either --chrome-sxs or the executable path). |
| 91 static bool IsChromeSxSProcess(); | 91 static bool IsChromeSxSProcess(); |
| 92 | 92 |
| 93 // Returns true if the Chrome installed at |chrome_exe| has a Windows shell |
| 94 // DelegateExecute verb handler. |
| 95 static bool HasDelegateExecuteHandler(BrowserDistribution* dist, |
| 96 const string16& chrome_exe); |
| 97 |
| 93 // Deletes the registry key at path key_path under the key given by root_key. | 98 // Deletes the registry key at path key_path under the key given by root_key. |
| 94 static bool DeleteRegistryKey(HKEY root_key, const std::wstring& key_path); | 99 static bool DeleteRegistryKey(HKEY root_key, const std::wstring& key_path); |
| 95 | 100 |
| 96 // Deletes the registry value named value_name at path key_path under the key | 101 // Deletes the registry value named value_name at path key_path under the key |
| 97 // given by reg_root. | 102 // given by reg_root. |
| 98 static bool DeleteRegistryValue(HKEY reg_root, const std::wstring& key_path, | 103 static bool DeleteRegistryValue(HKEY reg_root, const std::wstring& key_path, |
| 99 const std::wstring& value_name); | 104 const std::wstring& value_name); |
| 100 | 105 |
| 101 // An interface to a predicate function for use by DeleteRegistryKeyIf and | 106 // An interface to a predicate function for use by DeleteRegistryKeyIf and |
| 102 // DeleteRegistryValueIf. | 107 // DeleteRegistryValueIf. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 160 |
| 156 // Returns a string in the form YYYYMMDD of the current date. | 161 // Returns a string in the form YYYYMMDD of the current date. |
| 157 static std::wstring GetCurrentDate(); | 162 static std::wstring GetCurrentDate(); |
| 158 | 163 |
| 159 private: | 164 private: |
| 160 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 165 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
| 161 }; | 166 }; |
| 162 | 167 |
| 163 | 168 |
| 164 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ | 169 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_ |
| OLD | NEW |