Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8072)

Unified Diff: chrome/installer/mini_installer/mini_installer.h

Issue 2661463003: Extract the mini_installer's entrypoint into its own source file. (Closed)
Patch Set: shrink memset Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/mini_installer/BUILD.gn ('k') | chrome/installer/mini_installer/mini_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/mini_installer.h
diff --git a/chrome/installer/mini_installer/mini_installer.h b/chrome/installer/mini_installer/mini_installer.h
new file mode 100644
index 0000000000000000000000000000000000000000..8f2703a1899954220fb5d20a9354543d79416fd6
--- /dev/null
+++ b/chrome/installer/mini_installer/mini_installer.h
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_
+#define CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_
+
+#include <windows.h>
+
+#include "chrome/installer/mini_installer/exit_code.h"
+
+namespace mini_installer {
+
+// A container of a process exit code (eventually passed to ExitProcess) and
+// a Windows error code for cases where the exit code is non-zero.
+struct ProcessExitResult {
+ DWORD exit_code;
+ DWORD windows_error;
+
+ explicit ProcessExitResult(DWORD exit) : exit_code(exit), windows_error(0) {}
+ ProcessExitResult(DWORD exit, DWORD win)
+ : exit_code(exit), windows_error(win) {}
+
+ bool IsSuccess() const { return exit_code == SUCCESS_EXIT_CODE; }
+};
+
+// Main function for Chrome's mini_installer. First gets a working dir, unpacks
+// the resources, and finally executes setup.exe to do the install/update. Also
+// handles invoking a previous version's setup.exe to patch itself in the case
+// of differential updates.
+ProcessExitResult WMain(HMODULE module);
+
+} // namespace mini_installer
+
+#endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_INSTALLER_H_
« no previous file with comments | « chrome/installer/mini_installer/BUILD.gn ('k') | chrome/installer/mini_installer/mini_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698