summaryrefslogtreecommitdiffstats
path: root/base/command_line.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:57:23 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 15:57:23 +0000
commit2e4c50cd49a81bef973b934c236b110e660f3746 (patch)
treeae4a3d58d0a8efc60d47494305b59c57980eac78 /base/command_line.h
parent445a971d141c3b745a84f8fed3a2d627789ebf22 (diff)
downloadchromium_src-2e4c50cd49a81bef973b934c236b110e660f3746.zip
chromium_src-2e4c50cd49a81bef973b934c236b110e660f3746.tar.gz
chromium_src-2e4c50cd49a81bef973b934c236b110e660f3746.tar.bz2
Remove deprecated CommandLine::GetLooseValues(), rename to args().
It returned a wstring, when really we wanted the native encoded strings. Fixing the majority of callers actually simplified them in many cases because the callers wanted native strings too. Since I'm touching every caller, I gave it a more useful name. I'm not sure where "loose" came from but it never made sense to me. BUG=24672 Review URL: http://codereview.chromium.org/3028010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.h')
-rw-r--r--base/command_line.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/base/command_line.h b/base/command_line.h
index c68711a..2c4f32d 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -5,10 +5,9 @@
// This class works with command lines: building and parsing.
// Switches can optionally have a value attached using an equals sign,
// as in "-switch=value". Arguments that aren't prefixed with a
-// switch prefix are considered "loose parameters". Switch names are
-// case-insensitive. An argument of "--" will terminate switch
-// parsing, causing everything after to be considered as loose
-// parameters.
+// switch prefix are saved as extra arguments. An argument of "--"
+// will terminate switch parsing, causing everything after to be
+// considered as extra arguments.
// There is a singleton read-only CommandLine that represents the command
// line that the current process was started with. It must be initialized
@@ -139,8 +138,7 @@ class CommandLine {
}
// Get the remaining arguments to the command.
- // WARNING: this is incorrect on POSIX; we must do string conversions.
- std::vector<std::wstring> GetLooseValues() const;
+ const std::vector<StringType>& args() const { return args_; }
#if defined(OS_WIN)
// Returns the original command line string.
@@ -239,7 +237,7 @@ class CommandLine {
SwitchMap switches_;
// Non-switch command-line arguments.
- std::vector<StringType> loose_values_;
+ std::vector<StringType> args_;
// We allow copy constructors, because a common pattern is to grab a
// copy of the current process's command line and then add some