| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_ |
| 6 #define CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 |
| 10 #include "chrome/installer/mini_installer/exit_code.h" |
| 11 |
| 12 namespace mini_installer { |
| 13 |
| 14 // A container of a process exit code (eventually passed to ExitProcess) and |
| 15 // a Windows error code for cases where the exit code is non-zero. |
| 16 struct ProcessExitResult { |
| 17 DWORD exit_code; |
| 18 DWORD windows_error; |
| 19 |
| 20 explicit ProcessExitResult(DWORD exit) : exit_code(exit), windows_error(0) {} |
| 21 ProcessExitResult(DWORD exit, DWORD win) |
| 22 : exit_code(exit), windows_error(win) {} |
| 23 |
| 24 bool IsSuccess() const { return exit_code == SUCCESS_EXIT_CODE; } |
| 25 }; |
| 26 |
| 27 // Main function for Chrome's mini_installer. First gets a working dir, unpacks |
| 28 // the resources, and finally executes setup.exe to do the install/update. Also |
| 29 // handles invoking a previous version's setup.exe to patch itself in the case |
| 30 // of differential updates. |
| 31 ProcessExitResult WMain(HMODULE module); |
| 32 |
| 33 } // namespace mini_installer |
| 34 |
| 35 #endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_ |
| OLD | NEW |