| 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 // 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual bool Evaluate(const std::wstring& value) const OVERRIDE; | 144 virtual bool Evaluate(const std::wstring& value) const OVERRIDE; |
| 145 protected: | 145 protected: |
| 146 std::wstring value_to_match_; | 146 std::wstring value_to_match_; |
| 147 private: | 147 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(ValueEquals); | 148 DISALLOW_COPY_AND_ASSIGN(ValueEquals); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 // Returns zero on install success, or an InstallStatus value otherwise. | 151 // Returns zero on install success, or an InstallStatus value otherwise. |
| 152 static int GetInstallReturnCode(installer::InstallStatus install_status); | 152 static int GetInstallReturnCode(installer::InstallStatus install_status); |
| 153 | 153 |
| 154 // Composes |exe_path| and |arguments| into |command_line|. | 154 // Composes |program| and |arguments| into |command_line|. |
| 155 static void MakeUninstallCommand(const std::wstring& exe_path, | 155 static void MakeUninstallCommand(const std::wstring& program, |
| 156 const std::wstring& arguments, | 156 const std::wstring& arguments, |
| 157 CommandLine* command_line); | 157 CommandLine* command_line); |
| 158 | 158 |
| 159 // Returns a string in the form YYYYMMDD of the current date. | 159 // Returns a string in the form YYYYMMDD of the current date. |
| 160 static std::wstring GetCurrentDate(); | 160 static std::wstring GetCurrentDate(); |
| 161 | 161 |
| 162 private: | 162 private: |
| 163 DISALLOW_COPY_AND_ASSIGN(InstallUtil); | 163 DISALLOW_COPY_AND_ASSIGN(InstallUtil); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 | 166 |
| 167 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ | 167 #endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H__ |
| OLD | NEW |