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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1036823003: Fix to respect --explicitly-allowed-ports command line option-Chromium Side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « content/child/blink_platform_impl.h ('k') | content/child/blink_platform_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 2c71a251fcc9e844bf7babe5fd2bbfdc86288099..04305667bf92e852bc086f3e92e4754602818c5e 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -505,6 +505,18 @@ bool BlinkPlatformImpl::isReservedIPAddress(
return net::IsIPAddressReserved(address);
}
+bool BlinkPlatformImpl::portAllowed(const blink::WebURL& url) const {
+ GURL gurl = GURL(url);
+ if (!gurl.has_port())
+ return true;
+ int port = gurl.IntPort();
+ if (net::IsPortAllowedByOverride(port))
+ return true;
+ if (gurl.SchemeIs("ftp"))
+ return net::IsPortAllowedByFtp(port);
+ return net::IsPortAllowedByDefault(port);
+}
+
blink::WebThread* BlinkPlatformImpl::createThread(const char* name) {
WebThreadImpl* thread = new WebThreadImpl(name);
thread->TaskRunner()->PostTask(
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/child/blink_platform_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698