Index: test/multiprocess_exec_win.cc |
diff --git a/test/multiprocess_exec_win.cc b/test/multiprocess_exec_win.cc |
index 6a1262ba1234e2ef87213f33048263dbec278802..23853dd0acde0942e7b02170a81a6213b5645c24 100644 |
--- a/test/multiprocess_exec_win.cc |
+++ b/test/multiprocess_exec_win.cc |
@@ -17,48 +17,11 @@ |
#include "base/logging.h" |
#include "base/strings/utf_string_conversions.h" |
#include "gtest/gtest.h" |
+#include "test/win/child_launcher.h" |
namespace crashpad { |
namespace test { |
-namespace { |
- |
-// Ref: http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx |
-void AppendCommandLineArgument(const std::wstring& argument, |
- std::wstring* command_line) { |
- // Don't bother quoting if unnecessary. |
- if (!argument.empty() && |
- argument.find_first_of(L" \t\n\v\"") == std::wstring::npos) { |
- command_line->append(argument); |
- } else { |
- command_line->push_back(L'"'); |
- for (std::wstring::const_iterator i = argument.begin();; ++i) { |
- size_t backslash_count = 0; |
- while (i != argument.end() && *i == L'\\') { |
- ++i; |
- ++backslash_count; |
- } |
- if (i == argument.end()) { |
- // Escape all backslashes, but let the terminating double quotation mark |
- // we add below be interpreted as a metacharacter. |
- command_line->append(backslash_count * 2, L'\\'); |
- break; |
- } else if (*i == L'"') { |
- // Escape all backslashes and the following double quotation mark. |
- command_line->append(backslash_count * 2 + 1, L'\\'); |
- command_line->push_back(*i); |
- } else { |
- // Backslashes aren't special here. |
- command_line->append(backslash_count, L'\\'); |
- command_line->push_back(*i); |
- } |
- } |
- command_line->push_back(L'"'); |
- } |
-} |
- |
-} // namespace |
- |
namespace internal { |
struct MultiprocessInfo { |