summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:03:47 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 21:03:47 +0000
commit6775e40aeb887f15dc9182b250cdc4100aa79ce0 (patch)
tree858e3064689861a9ad85975154ce653418aaf3d8 /net/base
parent5bd8d1716b3f27664348c7fcb2c33f2e3a4573a7 (diff)
downloadchromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.zip
chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.gz
chromium_src-6775e40aeb887f15dc9182b250cdc4100aa79ce0.tar.bz2
Change other usages of .size() to .empty() when applicable.
BUG=carnitas TEST=compiles Review URL: http://codereview.chromium.org/6609008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/cookie_monster.cc2
-rw-r--r--net/base/dnssec_chain_verifier.cc7
-rw-r--r--net/base/x509_cert_types_mac.cc2
-rw-r--r--net/base/x509_certificate_mac.cc2
-rw-r--r--net/base/x509_certificate_win.cc2
5 files changed, 6 insertions, 9 deletions
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 05e7355..b856f8a 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -1579,7 +1579,7 @@ CookieMonster::ParsedCookie::ParsedCookie(const std::string& cookie_line)
}
ParseTokenValuePairs(cookie_line);
- if (pairs_.size() > 0) {
+ if (!pairs_.empty()) {
is_valid_ = true;
SetupAttributes();
}
diff --git a/net/base/dnssec_chain_verifier.cc b/net/base/dnssec_chain_verifier.cc
index 6e68365..c79efa8 100644
--- a/net/base/dnssec_chain_verifier.cc
+++ b/net/base/dnssec_chain_verifier.cc
@@ -732,12 +732,9 @@ DNSSECChainVerifier::Error DNSSECChainVerifier::ReadDSSet(
}
digest_types[i] = digest_type;
- if (digest.size() > 0) {
+ lookahead[i] = digest.empty();
+ if (!digest.empty())
(*rrdatas)[i] = digest;
- lookahead[i] = false;
- } else {
- lookahead[i] = true;
- }
}
base::StringPiece next_entry_key;
diff --git a/net/base/x509_cert_types_mac.cc b/net/base/x509_cert_types_mac.cc
index c672863..a45dc71 100644
--- a/net/base/x509_cert_types_mac.cc
+++ b/net/base/x509_cert_types_mac.cc
@@ -150,7 +150,7 @@ void SetSingle(const std::vector<std::string>& values,
std::string* single_value) {
// We don't expect to have more than one CN, L, S, and C.
LOG_IF(WARNING, values.size() > 1) << "Didn't expect multiple values";
- if (values.size() > 0)
+ if (!values.empty())
*single_value = values[0];
}
diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc
index f9023fd..839e91e 100644
--- a/net/base/x509_certificate_mac.cc
+++ b/net/base/x509_certificate_mac.cc
@@ -1128,7 +1128,7 @@ bool X509Certificate::GetSSLClientCertificates(
// Make sure the issuer matches valid_issuers, if given.
// But an explicit cert preference overrides this.
if (!is_preferred &&
- valid_issuers.size() > 0 &&
+ !valid_issuers.empty() &&
!cert->IsIssuedBy(valid_issuers))
continue;
diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc
index fed56e3..98e3367 100644
--- a/net/base/x509_certificate_win.cc
+++ b/net/base/x509_certificate_win.cc
@@ -405,7 +405,7 @@ void ParsePrincipal(const std::string& description,
for (int i = 0; i < arraysize(single_value_lists); ++i) {
int length = static_cast<int>(single_value_lists[i]->size());
DCHECK(single_value_lists[i]->size() <= 1);
- if (single_value_lists[i]->size() > 0)
+ if (!single_value_lists[i]->empty())
*(single_values[i]) = (*(single_value_lists[i]))[0];
}
}