OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 util functions for setup project. | 5 // This file declares util functions for setup project. |
6 | 6 |
7 #ifndef CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 7 #ifndef CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
8 #define CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 8 #define CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include "chrome/installer/util/version.h" | 11 #include "chrome/installer/util/version.h" |
12 | 12 |
| 13 class FilePath; |
| 14 |
13 namespace setup_util { | 15 namespace setup_util { |
14 // Apply a diff patch to source file. First tries to apply it using courgette | 16 // Apply a diff patch to source file. First tries to apply it using courgette |
15 // since it checks for courgette header and fails quickly. If that fails | 17 // since it checks for courgette header and fails quickly. If that fails |
16 // tries to apply the patch using regular bsdiff. Returns status code. | 18 // tries to apply the patch using regular bsdiff. Returns status code. |
17 int ApplyDiffPatch(const std::wstring& src, | 19 int ApplyDiffPatch(const FilePath& src, |
18 const std::wstring& patch, | 20 const FilePath& patch, |
19 const std::wstring& dest); | 21 const FilePath& dest); |
20 | 22 |
21 // Find the version of Chrome from an install source directory. | 23 // Find the version of Chrome from an install source directory. |
22 // Chrome_path should contain a version folder. | 24 // Chrome_path should contain a version folder. |
23 // Returns the first version found or NULL if no version is found. | 25 // Returns the first version found or NULL if no version is found. |
24 installer::Version* GetVersionFromDir(const std::wstring& chrome_path); | 26 installer::Version* GetVersionFromDir(const FilePath& chrome_path); |
25 } // namespace setup_util | 27 } // namespace setup_util |
26 | 28 |
27 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 29 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
OLD | NEW |