| 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 30 matching lines...) Expand all Loading... |
| 41 // Courgette's flavor of bsdiff. Returns 0 in case of success, or | 41 // Courgette's flavor of bsdiff. Returns 0 in case of success, or |
| 42 // kBsdiffErrorOffset + a bsdiff status code in case of errors. | 42 // kBsdiffErrorOffset + a bsdiff status code in case of errors. |
| 43 // See courgette/third_party/bsdiff.h for details. | 43 // See courgette/third_party/bsdiff.h for details. |
| 44 int BsdiffPatchFiles(const base::FilePath& src, | 44 int BsdiffPatchFiles(const base::FilePath& src, |
| 45 const base::FilePath& patch, | 45 const base::FilePath& patch, |
| 46 const base::FilePath& dest); | 46 const base::FilePath& dest); |
| 47 | 47 |
| 48 // Find the version of Chrome from an install source directory. | 48 // Find the version of Chrome from an install source directory. |
| 49 // Chrome_path should contain at least one version folder. | 49 // Chrome_path should contain at least one version folder. |
| 50 // Returns the maximum version found or NULL if no version is found. | 50 // Returns the maximum version found or NULL if no version is found. |
| 51 base::Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path); | 51 Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path); |
| 52 | 52 |
| 53 // Returns the uncompressed archive of the installed version that serves as the | 53 // Returns the uncompressed archive of the installed version that serves as the |
| 54 // source for patching. | 54 // source for patching. |
| 55 base::FilePath FindArchiveToPatch(const InstallationState& original_state, | 55 base::FilePath FindArchiveToPatch(const InstallationState& original_state, |
| 56 const InstallerState& installer_state); | 56 const InstallerState& installer_state); |
| 57 | 57 |
| 58 // Spawns a new process that waits for a specified amount of time before | 58 // Spawns a new process that waits for a specified amount of time before |
| 59 // attempting to delete |path|. This is useful for setup to delete the | 59 // attempting to delete |path|. This is useful for setup to delete the |
| 60 // currently running executable or a file that we cannot close right away but | 60 // currently running executable or a file that we cannot close right away but |
| 61 // estimate that it will be possible after some period of time. | 61 // estimate that it will be possible after some period of time. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // The previous state of the privilege this object is responsible for. As set | 138 // The previous state of the privilege this object is responsible for. As set |
| 139 // by AdjustTokenPrivileges() upon construction. | 139 // by AdjustTokenPrivileges() upon construction. |
| 140 TOKEN_PRIVILEGES previous_privileges_; | 140 TOKEN_PRIVILEGES previous_privileges_; |
| 141 | 141 |
| 142 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); | 142 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 } // namespace installer | 145 } // namespace installer |
| 146 | 146 |
| 147 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 147 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
| OLD | NEW |