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

Unified Diff: base/command_line.cc

Issue 329017: Remove deprecated CommandLine(std::wstring) ctor. (Closed)
Patch Set: Created 11 years, 2 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') | base/command_line_unittest.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 1e520044fb801fce19fd5620750f97489e1da6ab..4e3bb3ac513cc7799939448b3eabfe507d3ba6fe 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -52,6 +52,9 @@ static void Lowercase(std::string* parameter) {
#endif
#if defined(OS_WIN)
+CommandLine::CommandLine(ArgumentsOnly args_only) {
+}
+
void CommandLine::ParseFromString(const std::wstring& command_line) {
TrimWhitespace(command_line, TRIM_ALL, &command_line_string_);
@@ -101,14 +104,12 @@ CommandLine::CommandLine(const FilePath& program) {
}
}
-// Deprecated version
-CommandLine::CommandLine(const std::wstring& program) {
- if (!program.empty()) {
- program_ = program;
- command_line_string_ = L'"' + program + L'"';
- }
-}
#elif defined(OS_POSIX)
+CommandLine::CommandLine(ArgumentsOnly args_only) {
+ // Push an empty argument, because we always assume argv_[0] is a program.
+ argv_.push_back("");
+}
+
void CommandLine::InitFromArgv(int argc, const char* const* argv) {
for (int i = 0; i < argc; ++i)
argv_.push_back(argv[i]);
@@ -145,10 +146,6 @@ CommandLine::CommandLine(const FilePath& program) {
argv_.push_back(program.value());
}
-// Deprecated version
-CommandLine::CommandLine(const std::wstring& program) {
- argv_.push_back(base::SysWideToNativeMB(program));
-}
#endif
// static
« no previous file with comments | « base/command_line.h ('k') | base/command_line_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698