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

Unified Diff: chrome/browser/plugins/plugin_metadata.cc

Issue 2950803002: Use ContainsValue() instead of std::find() in chrome/browser/ and chrome/test/ (Closed)
Patch Set: Reverted code for file thumbnail_cache.cc Created 3 years, 6 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/plugins/plugin_metadata.cc
diff --git a/chrome/browser/plugins/plugin_metadata.cc b/chrome/browser/plugins/plugin_metadata.cc
index a6eaea6ca4119712be96adc500c11a77d2ff2e80..5106f37ae1a7894a55519115a45ec00a7e67f033 100644
--- a/chrome/browser/plugins/plugin_metadata.cc
+++ b/chrome/browser/plugins/plugin_metadata.cc
@@ -6,10 +6,9 @@
#include <stddef.h>
-#include <algorithm>
-
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "content/public/common/webplugininfo.h"
@@ -61,8 +60,7 @@ void PluginMetadata::AddMatchingMimeType(const std::string& mime_type) {
}
bool PluginMetadata::HasMimeType(const std::string& mime_type) const {
- return std::find(all_mime_types_.begin(), all_mime_types_.end(), mime_type) !=
- all_mime_types_.end();
+ return base::ContainsValue(all_mime_types_, mime_type);
}
bool PluginMetadata::MatchesPlugin(const content::WebPluginInfo& plugin) {

Powered by Google App Engine
This is Rietveld 408576698