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

Unified Diff: net/base/network_throttle_manager_impl.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/base/mime_util_unittest.cc ('k') | net/cert/x509_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_throttle_manager_impl.cc
diff --git a/net/base/network_throttle_manager_impl.cc b/net/base/network_throttle_manager_impl.cc
index eda6fea2cfccc7c0f967d1aac4497e5ccd188252..4ca235a1017ad6998bc3f3af4166c24087669bbb 100644
--- a/net/base/network_throttle_manager_impl.cc
+++ b/net/base/network_throttle_manager_impl.cc
@@ -4,9 +4,8 @@
#include "net/base/network_throttle_manager_impl.h"
-#include <algorithm>
-
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/default_tick_clock.h"
@@ -241,10 +240,8 @@ void NetworkThrottleManagerImpl::OnThrottleDestroyed(ThrottleImpl* throttle) {
break;
}
- DCHECK(std::find(blocked_throttles_.begin(), blocked_throttles_.end(),
- throttle) == blocked_throttles_.end());
- DCHECK(std::find(outstanding_throttles_.begin(), outstanding_throttles_.end(),
- throttle) == outstanding_throttles_.end());
+ DCHECK(!base::ContainsValue(blocked_throttles_, throttle));
+ DCHECK(!base::ContainsValue(outstanding_throttles_, throttle));
// Unblock the throttles if there's some chance there's a throttle to
// unblock.
« no previous file with comments | « net/base/mime_util_unittest.cc ('k') | net/cert/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698