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 13 matching lines...) Expand all Loading... |
24 class FilePath; | 24 class FilePath; |
25 class Version; | 25 class Version; |
26 } | 26 } |
27 | 27 |
28 namespace installer { | 28 namespace installer { |
29 | 29 |
30 class InstallationState; | 30 class InstallationState; |
31 class InstallerState; | 31 class InstallerState; |
32 class ProductState; | 32 class ProductState; |
33 | 33 |
| 34 // Sets a bit in the registry to note that the latest OS upgrade notification |
| 35 // has been handled by this user. Returns true if the previous bit was |
| 36 // different or absent (i.e., the latest OS update wasn't handled yet), in |
| 37 // which case subsequent calls to this method will return false until the next |
| 38 // OS upgrade. This call is only valid on system-level installs. |
| 39 bool UpdateLastOSUpgradeHandledByActiveSetup(BrowserDistribution* dist); |
| 40 |
34 // Applies a patch file to source file using Courgette. Returns 0 in case of | 41 // Applies a patch file to source file using Courgette. Returns 0 in case of |
35 // success. In case of errors, it returns kCourgetteErrorOffset + a Courgette | 42 // success. In case of errors, it returns kCourgetteErrorOffset + a Courgette |
36 // status code, as defined in courgette/courgette.h | 43 // status code, as defined in courgette/courgette.h |
37 int CourgettePatchFiles(const base::FilePath& src, | 44 int CourgettePatchFiles(const base::FilePath& src, |
38 const base::FilePath& patch, | 45 const base::FilePath& patch, |
39 const base::FilePath& dest); | 46 const base::FilePath& dest); |
40 | 47 |
41 // Applies a patch file to source file using bsdiff. This function uses | 48 // Applies a patch file to source file using bsdiff. This function uses |
42 // Courgette's flavor of bsdiff. Returns 0 in case of success, or | 49 // Courgette's flavor of bsdiff. Returns 0 in case of success, or |
43 // kBsdiffErrorOffset + a bsdiff status code in case of errors. | 50 // kBsdiffErrorOffset + a bsdiff status code in case of errors. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // The previous state of the privilege this object is responsible for. As set | 156 // The previous state of the privilege this object is responsible for. As set |
150 // by AdjustTokenPrivileges() upon construction. | 157 // by AdjustTokenPrivileges() upon construction. |
151 TOKEN_PRIVILEGES previous_privileges_; | 158 TOKEN_PRIVILEGES previous_privileges_; |
152 | 159 |
153 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); | 160 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); |
154 }; | 161 }; |
155 | 162 |
156 } // namespace installer | 163 } // namespace installer |
157 | 164 |
158 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 165 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
OLD | NEW |