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

Unified Diff: base/command_line.cc

Issue 3030043: PrependWrapper is platform-specific, so it should take a platform string. (Closed)
Patch Set: Created 10 years, 4 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 | « base/command_line.h ('k') | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/command_line.cc
diff --git a/base/command_line.cc b/base/command_line.cc
index e180ddfd69f295e520e059a65c84cfadaa575f32..8d36e16d0e21786a809c9b59adc8853f68f7d0ba 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -432,6 +432,8 @@ void CommandLine::AppendArguments(const CommandLine& other,
}
void CommandLine::PrependWrapper(const std::wstring& wrapper) {
+ if (wrapper.empty())
+ return;
// The wrapper may have embedded arguments (like "gdb --args"). In this case,
// we don't pretend to do anything fancy, we just split on spaces.
std::vector<std::wstring> wrapper_and_args;
@@ -475,10 +477,9 @@ void CommandLine::AppendArguments(const CommandLine& other,
switches_[i->first] = i->second;
}
-void CommandLine::PrependWrapper(const std::wstring& wrapper_wide) {
+void CommandLine::PrependWrapper(const std::string& wrapper) {
// The wrapper may have embedded arguments (like "gdb --args"). In this case,
// we don't pretend to do anything fancy, we just split on spaces.
- const std::string wrapper = base::SysWideToNativeMB(wrapper_wide);
std::vector<std::string> wrapper_and_args;
SplitString(wrapper, ' ', &wrapper_and_args);
argv_.insert(argv_.begin(), wrapper_and_args.begin(), wrapper_and_args.end());
« no previous file with comments | « base/command_line.h ('k') | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698