summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 21:42:52 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-03 21:42:52 +0000
commit4766b28875c45e5eca6ff16272f85c691e9a181a (patch)
tree77546401f7cb81f6cc89bcde9d7e1a78bcb836e2 /base/command_line.cc
parent8fbf1af880b2954fceb062cd88ea87f660e7d393 (diff)
downloadchromium_src-4766b28875c45e5eca6ff16272f85c691e9a181a.zip
chromium_src-4766b28875c45e5eca6ff16272f85c691e9a181a.tar.gz
chromium_src-4766b28875c45e5eca6ff16272f85c691e9a181a.tar.bz2
Cleanup: Replace deprecated CommandLine::program() with CommandLine::GetProgram(). Simplify a couple DCHECKs with DCHECK_EQ.
Committing for Shriram Kunchanapalli (kshriram18@gmail.com) Original code review: http://codereview.chromium.org/413003/show BUG=none TEST=none Review URL: http://codereview.chromium.org/1733010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index 53859d6..bc4e1a0 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -374,7 +374,7 @@ void CommandLine::AppendArguments(const CommandLine& other,
bool include_program) {
// Verify include_program is used correctly.
// Logic could be shorter but this is clearer.
- DCHECK(include_program ? !other.program().empty() : other.program().empty());
+ DCHECK_EQ(include_program, !other.GetProgram().empty());
command_line_string_ += L" " + other.command_line_string_;
std::map<std::string, StringType>::const_iterator i;
for (i = other.switches_.begin(); i != other.switches_.end(); ++i)
@@ -413,8 +413,7 @@ void CommandLine::AppendArguments(const CommandLine& other,
bool include_program) {
// Verify include_program is used correctly.
// Logic could be shorter but this is clearer.
- DCHECK(include_program ? !other.program().empty() : other.program().empty());
-
+ DCHECK_EQ(include_program, !other.GetProgram().empty());
size_t first_arg = include_program ? 0 : 1;
for (size_t i = first_arg; i < other.argv_.size(); ++i)
argv_.push_back(other.argv_[i]);