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

Unified Diff: ios/web/webui/url_data_manager_ios_backend.mm

Issue 2945803002: Use ContainsValue() instead of std::find() in ios/ (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
Index: ios/web/webui/url_data_manager_ios_backend.mm
diff --git a/ios/web/webui/url_data_manager_ios_backend.mm b/ios/web/webui/url_data_manager_ios_backend.mm
index a2b618ba6fe01588a104311ea7196d5420d6aee7..3938742b11de5a8accc8fb5ac322e08a4397d08c 100644
--- a/ios/web/webui/url_data_manager_ios_backend.mm
+++ b/ios/web/webui/url_data_manager_ios_backend.mm
@@ -18,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.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/trace_event/trace_event.h"
@@ -55,7 +56,7 @@ const char kChromeURLXFrameOptionsHeader[] = "X-Frame-Options: DENY";
bool SchemeIsInSchemes(const std::string& scheme,
sdefresne 2017/06/23 14:31:21 ditto, just inline base::ContainsValue in the one
Tripta 2017/06/27 06:41:28 Done.
const std::vector<std::string>& schemes) {
- return std::find(schemes.begin(), schemes.end(), scheme) != schemes.end();
+ return base::ContainsValue(schemes, scheme);
}
// Returns whether |url| passes some sanity checks and is a valid GURL.

Powered by Google App Engine
This is Rietveld 408576698