Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: chrome/common/extensions/user_script.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/update_manifest.cc ('k') | chrome/common/unix_domain_socket_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.cc
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index f71de5c3a4ee816778f8b148f38ae2deb66e2459..b66dee9445f0b416b1740e7ae12d63c694ccb79e 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.cc
@@ -79,17 +79,17 @@ void UserScript::add_url_pattern(const URLPattern& pattern) {
void UserScript::clear_url_patterns() { url_patterns_.clear(); }
bool UserScript::MatchesUrl(const GURL& url) const {
- if (url_patterns_.size() > 0) {
+ if (!url_patterns_.empty()) {
if (!UrlMatchesPatterns(&url_patterns_, url))
return false;
}
- if (globs_.size() > 0) {
+ if (!globs_.empty()) {
if (!UrlMatchesGlobs(&globs_, url))
return false;
}
- if (exclude_globs_.size() > 0) {
+ if (!exclude_globs_.empty()) {
if (UrlMatchesGlobs(&exclude_globs_, url))
return false;
}
« no previous file with comments | « chrome/common/extensions/update_manifest.cc ('k') | chrome/common/unix_domain_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698