[base] Use std::wstring for NativeEnvironmentString on Windows

This change modifies base::NativeEnvironmentString to be std::wstring on
Windows and updates affected code.

Bug: 911896
Change-Id: Ib39c473f42a2cd3384dd6fefd11021e4636629c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891311
Reviewed-by: Robert Liao <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Jan Wilken Dörrie <[email protected]>
Cr-Commit-Position: refs/heads/master@{#712523}
diff --git a/base/process/launch.h b/base/process/launch.h
index 24fb4273..37031a8 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -14,6 +14,7 @@
 #include <vector>
 
 #include "base/base_export.h"
+#include "base/command_line.h"
 #include "base/environment.h"
 #include "base/macros.h"
 #include "base/process/process.h"
@@ -38,8 +39,6 @@
 
 namespace base {
 
-class CommandLine;
-
 #if defined(OS_WIN)
 typedef std::vector<HANDLE> HandlesToInheritVector;
 #elif defined(OS_FUCHSIA)
@@ -321,7 +320,7 @@
 //
 // Example (including literal quotes)
 //  cmdline = "c:\windows\explorer.exe" -foo "c:\bar\"
-BASE_EXPORT Process LaunchProcess(const string16& cmdline,
+BASE_EXPORT Process LaunchProcess(const CommandLine::StringType& cmdline,
                                   const LaunchOptions& options);
 
 // Launches a process with elevated privileges.  This does not behave exactly
@@ -379,7 +378,8 @@
 // A Windows-specific version of GetAppOutput that takes a command line string
 // instead of a CommandLine object. Useful for situations where you need to
 // control the command line arguments directly.
-BASE_EXPORT bool GetAppOutput(const StringPiece16& cl, std::string* output);
+BASE_EXPORT bool GetAppOutput(CommandLine::StringPieceType cl,
+                              std::string* output);
 #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
 // A POSIX-specific version of GetAppOutput that takes an argv array
 // instead of a CommandLine.  Useful for situations where you need to