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 // 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 const std::wstring& key_path); | 100 const std::wstring& key_path); |
101 | 101 |
102 // Deletes the registry value named value_name at path key_path under the key | 102 // Deletes the registry value named value_name at path key_path under the key |
103 // given by reg_root. | 103 // given by reg_root. |
104 static bool DeleteRegistryValue(HKEY reg_root, const std::wstring& key_path, | 104 static bool DeleteRegistryValue(HKEY reg_root, const std::wstring& key_path, |
105 const std::wstring& value_name); | 105 const std::wstring& value_name); |
106 | 106 |
107 // Returns zero on install success, or an InstallStatus value otherwise. | 107 // Returns zero on install success, or an InstallStatus value otherwise. |
108 static int GetInstallReturnCode(installer::InstallStatus install_status); | 108 static int GetInstallReturnCode(installer::InstallStatus install_status); |
109 | 109 |
| 110 // Returns a string in the form YYYYMMDD of the current date. |
| 111 static std::wstring GetCurrentDate(); |
| 112 |
110 private: | 113 private: |
111 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 114 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
112 }; | 115 }; |
113 | 116 |
114 | 117 |
115 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ | 118 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ |
OLD | NEW |