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_ |
11 | 11 |
12 #include <windows.h> | 12 #include <windows.h> |
| 13 #include <stdint.h> |
13 | 14 |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/basictypes.h" | 17 #include "base/macros.h" |
17 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
18 #include "base/win/scoped_handle.h" | 19 #include "base/win/scoped_handle.h" |
19 #include "chrome/installer/util/browser_distribution.h" | 20 #include "chrome/installer/util/browser_distribution.h" |
20 #include "chrome/installer/util/util_constants.h" | 21 #include "chrome/installer/util/util_constants.h" |
21 | 22 |
22 class AppRegistrationData; | 23 class AppRegistrationData; |
23 | 24 |
24 namespace base { | 25 namespace base { |
25 class CommandLine; | 26 class CommandLine; |
26 class FilePath; | 27 class FilePath; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const base::Version& desired_version); | 62 const base::Version& desired_version); |
62 | 63 |
63 // Spawns a new process that waits for a specified amount of time before | 64 // Spawns a new process that waits for a specified amount of time before |
64 // attempting to delete |path|. This is useful for setup to delete the | 65 // attempting to delete |path|. This is useful for setup to delete the |
65 // currently running executable or a file that we cannot close right away but | 66 // currently running executable or a file that we cannot close right away but |
66 // estimate that it will be possible after some period of time. | 67 // estimate that it will be possible after some period of time. |
67 // Returns true if a new process was started, false otherwise. Note that | 68 // Returns true if a new process was started, false otherwise. Note that |
68 // given the nature of this function, it is not possible to know if the | 69 // given the nature of this function, it is not possible to know if the |
69 // delete operation itself succeeded. | 70 // delete operation itself succeeded. |
70 bool DeleteFileFromTempProcess(const base::FilePath& path, | 71 bool DeleteFileFromTempProcess(const base::FilePath& path, |
71 uint32 delay_before_delete_ms); | 72 uint32_t delay_before_delete_ms); |
72 | 73 |
73 // Returns true if the product |type| will be installed after the current | 74 // Returns true if the product |type| will be installed after the current |
74 // setup.exe instance have carried out installation / uninstallation, at | 75 // setup.exe instance have carried out installation / uninstallation, at |
75 // the level specified by |installer_state|. | 76 // the level specified by |installer_state|. |
76 // This function only returns meaningful results for install and update | 77 // This function only returns meaningful results for install and update |
77 // operations if called after CheckPreInstallConditions (see setup_main.cc). | 78 // operations if called after CheckPreInstallConditions (see setup_main.cc). |
78 bool WillProductBePresentAfterSetup( | 79 bool WillProductBePresentAfterSetup( |
79 const installer::InstallerState& installer_state, | 80 const installer::InstallerState& installer_state, |
80 const installer::InstallationState& machine_state, | 81 const installer::InstallationState& machine_state, |
81 BrowserDistribution::Type type); | 82 BrowserDistribution::Type type); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // The previous state of the privilege this object is responsible for. As set | 145 // The previous state of the privilege this object is responsible for. As set |
145 // by AdjustTokenPrivileges() upon construction. | 146 // by AdjustTokenPrivileges() upon construction. |
146 TOKEN_PRIVILEGES previous_privileges_; | 147 TOKEN_PRIVILEGES previous_privileges_; |
147 | 148 |
148 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); | 149 DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege); |
149 }; | 150 }; |
150 | 151 |
151 } // namespace installer | 152 } // namespace installer |
152 | 153 |
153 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ | 154 #endif // CHROME_INSTALLER_SETUP_SETUP_UTIL_H_ |
OLD | NEW |