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..016e4ccd31ef21f8fc59f2304be42393eb8fdb74 100644 |
--- a/content/child/blink_platform_impl.cc |
+++ b/content/child/blink_platform_impl.cc |
@@ -505,6 +505,22 @@ bool BlinkPlatformImpl::isReservedIPAddress( |
return net::IsIPAddressReserved(address); |
} |
+bool BlinkPlatformImpl::portAllowed(const blink::WebURL& url) const { |
+ GURL gurl = GURL(url); |
+ int port = gurl.IntPort(); |
+ if (gurl.SchemeIsFile()) |
eroman
2015/04/13 15:55:34
I think in the case of a file:// URL gurl.has_port
Paritosh Kumar
2015/04/14 14:50:35
Thanks. Done.
|
+ return true; |
+ if (gurl.has_port()) { |
eroman
2015/04/13 15:55:35
Let's move this earlier (before calling IntPort())
Paritosh Kumar
2015/04/14 14:50:35
Acknowledged.
|
+ if (gurl.SchemeIs("ftp")) { |
+ return net::IsPortAllowedByFtp(port) |
+ || net::IsPortAllowedByOverride(port); |
tyoshino (SeeGerritForStatus)
2015/04/13 14:28:16
|| and && are placed at the end of the previous li
Paritosh Kumar
2015/04/14 14:50:35
Acknowledged.
|
+ } |
+ return net::IsPortAllowedByDefault(port) |
+ || net::IsPortAllowedByOverride(port); |
+ } |
+ return true; |
+} |
+ |
blink::WebThread* BlinkPlatformImpl::createThread(const char* name) { |
WebThreadImpl* thread = new WebThreadImpl(name); |
thread->TaskRunner()->PostTask( |