diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 15:57:23 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 15:57:23 +0000 |
commit | 2e4c50cd49a81bef973b934c236b110e660f3746 (patch) | |
tree | ae4a3d58d0a8efc60d47494305b59c57980eac78 /net | |
parent | 445a971d141c3b745a84f8fed3a2d627789ebf22 (diff) | |
download | chromium_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 'net')
-rw-r--r-- | net/tools/hresolv/hresolv.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/tools/hresolv/hresolv.cc b/net/tools/hresolv/hresolv.cc index 9c67070..d524bd7 100644 --- a/net/tools/hresolv/hresolv.cc +++ b/net/tools/hresolv/hresolv.cc @@ -354,14 +354,18 @@ bool ParseCommandLine(CommandLine* command_line, CommandLineOptions* options) { } bool ReadHostsAndTimesFromLooseValues( - const std::vector<std::wstring>& loose_args, + const std::vector<CommandLine::StringType>& args, std::vector<HostAndTime>* hosts_and_times) { - std::vector<std::wstring>::const_iterator loose_args_end = loose_args.end(); - for (std::vector<std::wstring>::const_iterator it = loose_args.begin(); - it != loose_args_end; + for (std::vector<CommandLine::StringType>::const_iterator it = + args.begin(); + it != args.end(); ++it) { // TODO(cbentzel): Read time offset. +#if defined(OS_WIN) HostAndTime host_and_time = {WideToASCII(*it), 0}; +#else + HostAndTime host_and_time = {*it, 0}; +#endif hosts_and_times->push_back(host_and_time); } return true; @@ -431,7 +435,7 @@ int main(int argc, char** argv) { // file into memory. std::vector<HostAndTime> hosts_and_times; if (options.input_path.empty()) { - if (!ReadHostsAndTimesFromLooseValues(command_line->GetLooseValues(), + if (!ReadHostsAndTimesFromLooseValues(command_line->args(), &hosts_and_times)) { exit(1); } |