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

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

Issue 2655473002: Handle spaces in the name of the mini_installer. (Closed)
Patch Set: rewrite with tests 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
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
index 8f2703a1899954220fb5d20a9354543d79416fd6..cb62f38324f4d23ff46f075adf1172a827699591 100644
--- a/chrome/installer/mini_installer/mini_installer.h
+++ b/chrome/installer/mini_installer/mini_installer.h
@@ -8,6 +8,7 @@
#include <windows.h>
#include "chrome/installer/mini_installer/exit_code.h"
+#include "chrome/installer/mini_installer/mini_string.h"
namespace mini_installer {
@@ -24,6 +25,14 @@ struct ProcessExitResult {
bool IsSuccess() const { return exit_code == SUCCESS_EXIT_CODE; }
};
+// A stack-based string large enough to hold an executable to run, two path
+// arguments, plus a few extra arguments.
+using CommandString = StackString<MAX_PATH * 4>;
bcwhite 2017/01/27 14:52:24 Change to MAX_PATH * 2 + NNN to match the comm
grt (UTC plus 2) 2017/01/27 15:31:38 If you mean "NNN" to be the room for extra argumen
+
+// Appends all command line flags (i.e., switches and arguments) in
+// |command_line| to |buffer|. |buffer| is unchanged in case of error.
bcwhite 2017/01/27 14:52:24 // The flags section is copied exactly: spaces, qu
grt (UTC plus 2) 2017/01/27 15:31:38 Done.
+void AppendCommandLineFlags(const wchar_t* command_line, CommandString* buffer);
+
// 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

Powered by Google App Engine
This is Rietveld 408576698