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

Unified Diff: extensions/common/features/simple_feature.cc

Issue 2236443003: extensions: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add braces Created 4 years, 4 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
Index: extensions/common/features/simple_feature.cc
diff --git a/extensions/common/features/simple_feature.cc b/extensions/common/features/simple_feature.cc
index 65f283b57729f6a82066dc996897688024c77b9e..37a0c80dc2572469423bd7d6ceb31b2d15ca6067 100644
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -399,7 +399,7 @@ Feature::Availability SimpleFeature::IsAvailableToManifest(
Manifest::Type type_to_check = (type == Manifest::TYPE_USER_SCRIPT) ?
Manifest::TYPE_EXTENSION : type;
if (!extension_types_.empty() &&
- !ContainsValue(extension_types_, type_to_check)) {
+ !base::ContainsValue(extension_types_, type_to_check)) {
return CreateAvailability(INVALID_TYPE, type);
}
@@ -421,7 +421,7 @@ Feature::Availability SimpleFeature::IsAvailableToManifest(
if (!MatchesManifestLocation(location))
return CreateAvailability(INVALID_LOCATION, type);
- if (!platforms_.empty() && !ContainsValue(platforms_, platform))
+ if (!platforms_.empty() && !base::ContainsValue(platforms_, platform))
return CreateAvailability(INVALID_PLATFORM, type);
if (min_manifest_version_ != 0 && manifest_version < min_manifest_version_)
@@ -465,7 +465,7 @@ Feature::Availability SimpleFeature::IsAvailableToContext(
// extension API calls, since there's no guarantee that the extension is
// "active" in current renderer process when the API permission check is
// done.
- if (!contexts_.empty() && !ContainsValue(contexts_, context))
+ if (!contexts_.empty() && !base::ContainsValue(contexts_, context))
return CreateAvailability(INVALID_CONTEXT, context);
// TODO(kalman): Consider checking |matches_| regardless of context type.
@@ -622,8 +622,8 @@ bool SimpleFeature::IsIdInList(const std::string& extension_id,
if (!IsValidExtensionId(extension_id))
return false;
- return (ContainsValue(list, extension_id) ||
- ContainsValue(list, HashedIdInHex(extension_id)));
+ return (base::ContainsValue(list, extension_id) ||
+ base::ContainsValue(list, HashedIdInHex(extension_id)));
}
bool SimpleFeature::MatchesManifestLocation(
« no previous file with comments | « extensions/common/features/base_feature_provider_unittest.cc ('k') | extensions/common/features/simple_feature_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698