diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 23:41:22 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-13 23:41:22 +0000 |
commit | 75f1c78e253686c71e4294a48b744375d0fe8560 (patch) | |
tree | 37bcb158f88c33e0e13cb26010ea7b35ae8e118c /base | |
parent | 8e63df81baee6cc66979255525cd900e00977969 (diff) | |
download | chromium_src-75f1c78e253686c71e4294a48b744375d0fe8560.zip chromium_src-75f1c78e253686c71e4294a48b744375d0fe8560.tar.gz chromium_src-75f1c78e253686c71e4294a48b744375d0fe8560.tar.bz2 |
Rename CommandLine::GetArgs(), update callers.
BUG=73195
TEST=none
Review URL: http://codereview.chromium.org/7352006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/command_line.cc | 2 | ||||
-rw-r--r-- | base/command_line.h | 3 | ||||
-rw-r--r-- | base/command_line_unittest.cc | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/base/command_line.cc b/base/command_line.cc index ff89e1a..8121aca 100644 --- a/base/command_line.cc +++ b/base/command_line.cc @@ -336,7 +336,7 @@ void CommandLine::CopySwitchesFrom(const CommandLine& source, } } -CommandLine::StringVector CommandLine::args() const { +CommandLine::StringVector CommandLine::GetArgs() const { // Gather all arguments after the last switch (may include kSwitchTerminator). StringVector args(argv_.begin() + begin_args_, argv_.end()); // Erase only the first kSwitchTerminator (maybe "--" is a legitimate page?) diff --git a/base/command_line.h b/base/command_line.h index 4b40133..802fa0f 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -118,8 +118,7 @@ class BASE_API CommandLine { size_t count); // Get the remaining arguments to the command. - // TODO(msw): Rename GetArgs. - StringVector args() const; + StringVector GetArgs() const; // Append an argument to the command line. Note that the argument is quoted // properly such that it is interpreted as one argument to the target command. diff --git a/base/command_line_unittest.cc b/base/command_line_unittest.cc index c2bfd11..3f949e5 100644 --- a/base/command_line_unittest.cc +++ b/base/command_line_unittest.cc @@ -73,7 +73,7 @@ TEST(CommandLineTest, CommandLineConstructor) { "other-switches")); EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation")); - const std::vector<CommandLine::StringType>& args = cl.args(); + const CommandLine::StringVector& args = cl.GetArgs(); ASSERT_EQ(6U, args.size()); std::vector<CommandLine::StringType>::const_iterator iter = args.begin(); @@ -134,7 +134,7 @@ TEST(CommandLineTest, CommandLineFromString) { EXPECT_EQ("45--output-rotation", cl.GetSwitchValueASCII("input-translation")); EXPECT_EQ(kTricky, cl.GetSwitchValueNative("quotes")); - const std::vector<CommandLine::StringType>& args = cl.args(); + const CommandLine::StringVector& args = cl.GetArgs(); ASSERT_EQ(5U, args.size()); std::vector<CommandLine::StringType>::const_iterator iter = args.begin(); @@ -163,13 +163,13 @@ TEST(CommandLineTest, EmptyString) { EXPECT_TRUE(cl_from_string.command_line_string().empty()); EXPECT_TRUE(cl_from_string.GetProgram().empty()); EXPECT_EQ(1U, cl_from_string.argv().size()); - EXPECT_TRUE(cl_from_string.args().empty()); + EXPECT_TRUE(cl_from_string.GetArgs().empty()); #endif CommandLine cl_from_argv(0, NULL); EXPECT_TRUE(cl_from_argv.command_line_string().empty()); EXPECT_TRUE(cl_from_argv.GetProgram().empty()); EXPECT_EQ(1U, cl_from_argv.argv().size()); - EXPECT_TRUE(cl_from_argv.args().empty()); + EXPECT_TRUE(cl_from_argv.GetArgs().empty()); } // Test methods for appending switches to a command line. |