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

Unified Diff: chrome/install_static/install_util.h

Issue 2543503003: Handle spaces and quotes in chrome_elf command line parser (Closed)
Patch Set: . Created 4 years 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 | « no previous file | chrome/install_static/install_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_util.h
diff --git a/chrome/install_static/install_util.h b/chrome/install_static/install_util.h
index cced287938cf8de97941f5c2a3255f077d07e08a..d411702f6ada0350e2b413cf453f4006189a2500 100644
--- a/chrome/install_static/install_util.h
+++ b/chrome/install_static/install_util.h
@@ -164,6 +164,12 @@ std::vector<std::wstring> TokenizeString16(const std::wstring& str,
wchar_t delimiter,
bool trim_spaces);
+// Tokenizes |command_line| in the same way as CommandLineToArgvW() in
+// shell32.dll, handling quoting, spacing etc. Normally only used from
+// GetSwitchValueFromCommandLine(), but exposed for testing.
+std::vector<std::wstring> TokenizeCommandLineToArray(
+ const std::wstring& command_line);
+
// We assume that the command line |command_line| contains multiple switches
// with the format --<switch name>=<switch value>. This function returns the
// value of the |switch_name| passed in.
« no previous file with comments | « no previous file | chrome/install_static/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698