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

Unified Diff: net/log/net_log.cc

Issue 2943703002: Use ContainsValue() instead of std::find() in net/ (Closed)
Patch Set: 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
« no previous file with comments | « net/http/transport_security_state.cc ('k') | net/quic/core/quic_tag.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log.cc
diff --git a/net/log/net_log.cc b/net/log/net_log.cc
index 3ba872e986b0972905bdb9111f07486d1c636ab5..fdb0a189e4d648c6001ac602cfbd4814e7f3ece0 100644
--- a/net/log/net_log.cc
+++ b/net/log/net_log.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -175,8 +176,7 @@ void NetLog::UpdateIsCapturing() {
bool NetLog::HasObserver(ThreadSafeObserver* observer) {
lock_.AssertAcquired();
- auto it = std::find(observers_.begin(), observers_.end(), observer);
- return it != observers_.end();
+ return base::ContainsValue(observers_, observer);
}
// static
« no previous file with comments | « net/http/transport_security_state.cc ('k') | net/quic/core/quic_tag.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698