summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 22:39:33 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-26 22:39:33 +0000
commit51343d5ae5d463fc4f84f4af79b44962a580cd4f (patch)
tree8d53ff6a0097950f2732ee5376bf0c83297c9c87 /base/command_line.cc
parent7b9db43fbc1731cabc985f6e026a07a2ceaafc28 (diff)
downloadchromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.zip
chromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.tar.gz
chromium_src-51343d5ae5d463fc4f84f4af79b44962a580cd4f.tar.bz2
Remove deprecated CommandLine(std::wstring) ctor.
Add a ctor for creating a CommandLine for carrying arguments; convert all the users to either that or the FilePath version. BUG=24672 Review URL: http://codereview.chromium.org/329017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 1e52004..4e3bb3a 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