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

Unified Diff: chrome/browser/extensions/extension_management.cc

Issue 2961033002: Use ContainsValue() instead of std::find() in chrome/browser/extensions (Closed)
Patch Set: Reverted code changes in language_settings_private_api.cc:307 Created 3 years, 5 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: chrome/browser/extensions/extension_management.cc
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
index 8427cafde7c7614cde801244d2c6b2d47c3f4c69..c4f7cdd19c048d80dac0d20b4cd03eb26f6bb2cf 100644
--- a/chrome/browser/extensions/extension_management.cc
+++ b/chrome/browser/extensions/extension_management.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/extensions/extension_management.h"
-#include <algorithm>
#include <utility>
#include "base/bind.h"
@@ -12,6 +11,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
+#include "base/stl_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/trace_event/trace_event.h"
@@ -162,8 +162,7 @@ bool ExtensionManagement::IsAllowedManifestType(
return true;
const std::vector<Manifest::Type>& allowed_types =
global_settings_->allowed_types;
- return std::find(allowed_types.begin(), allowed_types.end(), manifest_type) !=
- allowed_types.end();
+ return base::ContainsValue(allowed_types, manifest_type);
}
APIPermissionSet ExtensionManagement::GetBlockedAPIPermissions(

Powered by Google App Engine
This is Rietveld 408576698