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

Unified Diff: net/cookies/cookie_monster.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/cert/x509_certificate_bytes.cc ('k') | net/dns/host_resolver_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index b01599923ef13e75072f8c9479366916605f4d96..ef08e7c306cf4c5f966aefc51ee0b089c0c51534 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -44,7 +44,6 @@
#include "net/cookies/cookie_monster.h"
-#include <algorithm>
#include <functional>
#include <memory>
#include <set>
@@ -59,6 +58,7 @@
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -1011,8 +1011,7 @@ void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
bool CookieMonster::IsCookieableScheme(const std::string& scheme) {
DCHECK(thread_checker_.CalledOnValidThread());
- return std::find(cookieable_schemes_.begin(), cookieable_schemes_.end(),
- scheme) != cookieable_schemes_.end();
+ return base::ContainsValue(cookieable_schemes_, scheme);
}
const char* const CookieMonster::kDefaultCookieableSchemes[] = {"http", "https",
« no previous file with comments | « net/cert/x509_certificate_bytes.cc ('k') | net/dns/host_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698