| 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 util functions for setup project. It also declares a | 5 // This file declares util functions for setup project. It also declares a |
| 6 // few functions that the Chrome component updater uses for patching binary | 6 // few functions that the Chrome component updater uses for patching binary |
| 7 // deltas. | 7 // deltas. |
| 8 | 8 |
| 9 #ifndef CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 9 #ifndef CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
| 10 #define CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 10 #define CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Courgette's flavor of bsdiff. Returns 0 in case of success, or | 46 // Courgette's flavor of bsdiff. Returns 0 in case of success, or |
| 47 // kBsdiffErrorOffset + a bsdiff status code in case of errors. | 47 // kBsdiffErrorOffset + a bsdiff status code in case of errors. |
| 48 // See courgette/third_party/bsdiff/bsdiff.h for details. | 48 // See courgette/third_party/bsdiff/bsdiff.h for details. |
| 49 int BsdiffPatchFiles(const base::FilePath& src, | 49 int BsdiffPatchFiles(const base::FilePath& src, |
| 50 const base::FilePath& patch, | 50 const base::FilePath& patch, |
| 51 const base::FilePath& dest); | 51 const base::FilePath& dest); |
| 52 | 52 |
| 53 // Find the version of Chrome from an install source directory. | 53 // Find the version of Chrome from an install source directory. |
| 54 // Chrome_path should contain at least one version folder. | 54 // Chrome_path should contain at least one version folder. |
| 55 // Returns the maximum version found or NULL if no version is found. | 55 // Returns the maximum version found or NULL if no version is found. |
| 56 Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path); | 56 base::Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path); |
| 57 | 57 |
| 58 // Returns the uncompressed archive of the installed version that serves as the | 58 // Returns the uncompressed archive of the installed version that serves as the |
| 59 // source for patching. If |desired_version| is valid, only the path to that | 59 // source for patching. If |desired_version| is valid, only the path to that |
| 60 // version will be returned, or empty if it doesn't exist. | 60 // version will be returned, or empty if it doesn't exist. |
| 61 base::FilePath FindArchiveToPatch(const InstallationState& original_state, | 61 base::FilePath FindArchiveToPatch(const InstallationState& original_state, |
| 62 const InstallerState& installer_state, | 62 const InstallerState& installer_state, |
| 63 const base::Version& desired_version); | 63 const base::Version& desired_version); |
| 64 | 64 |
| 65 // Spawns a new process that waits for a specified amount of time before | 65 // Spawns a new process that waits for a specified amount of time before |
| 66 // attempting to delete |path|. This is useful for setup to delete the | 66 // attempting to delete |path|. This is useful for setup to delete the |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // The previous state of the privilege this object is responsible for. As set | 152 // The previous state of the privilege this object is responsible for. As set |
| 153 // by AdjustTokenPrivileges() upon construction. | 153 // by AdjustTokenPrivileges() upon construction. |
| 154 TOKEN_PRIVILEGES previous_privileges_; | 154 TOKEN_PRIVILEGES previous_privileges_; |
| 155 | 155 |
| 156 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); | 156 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace installer | 159 } // namespace installer |
| 160 | 160 |
| 161 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 161 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
| OLD | NEW |