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

Unified Diff: chrome/browser/prerender/prerender_contents.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/prerender/prerender_contents.cc
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 729406462e72923962ce9af64cae3e62c3b3153e..e6bd661306a61a3881a8f291b3e19c2614e2d281 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -6,13 +6,13 @@
#include <stddef.h>
-#include <algorithm>
#include <functional>
#include <utility>
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/process/process_metrics.h"
+#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -523,8 +523,7 @@ bool PrerenderContents::Matches(
session_storage_namespace_id_ != session_storage_namespace->id()) {
return false;
}
- return std::find(alias_urls_.begin(), alias_urls_.end(), url) !=
- alias_urls_.end();
+ return base::ContainsValue(alias_urls_, url);
}
void PrerenderContents::RenderProcessGone(base::TerminationStatus status) {
« no previous file with comments | « chrome/browser/plugins/plugin_metadata.cc ('k') | chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698