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..519f4ba0dd8d5aad5ec38f49a6074c6138e26a63 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" |
@@ -53,17 +54,12 @@ const char kChromeURLContentSecurityPolicyHeaderBase[] = |
const char kChromeURLXFrameOptionsHeader[] = "X-Frame-Options: DENY"; |
-bool SchemeIsInSchemes(const std::string& scheme, |
- const std::vector<std::string>& schemes) { |
- return std::find(schemes.begin(), schemes.end(), scheme) != schemes.end(); |
-} |
- |
// Returns whether |url| passes some sanity checks and is a valid GURL. |
bool CheckURLIsValid(const GURL& url) { |
std::vector<std::string> additional_schemes; |
DCHECK(GetWebClient()->IsAppSpecificURL(url) || |
(GetWebClient()->GetAdditionalWebUISchemes(&additional_schemes), |
- SchemeIsInSchemes(url.scheme(), additional_schemes))); |
+ base::ContainsValue(additional_schemes, url.scheme()))); |
if (!url.is_valid()) { |
NOTREACHED(); |