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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 2958223002: Use ContainsValue() instead of std::find() in chrome/browser and chrome/common (Closed)
Patch Set: Rebase patch. 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/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index e7eb37b223fbb804add1ff54de44c02a7ef63b56..64f3681d1e5704d909d8e3c05d2958c8464459b3 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/lazy_instance.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
@@ -330,8 +331,7 @@ void TabSpecificContentSettings::OnContentBlockedWithDetail(
#endif
if (type == CONTENT_SETTINGS_TYPE_PLUGINS && !details.empty() &&
- std::find(blocked_plugin_names_.begin(), blocked_plugin_names_.end(),
- details) == blocked_plugin_names_.end()) {
+ !base::ContainsValue(blocked_plugin_names_, details)) {
blocked_plugin_names_.push_back(details);
}
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698