| Index: content/child/blink_platform_impl.cc
|
| diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
|
| index 648ae99feecc57a91116617720002f691c9125ba..d2b774590f1d6eaf015d3381198f34fbc3c00110 100644
|
| --- a/content/child/blink_platform_impl.cc
|
| +++ b/content/child/blink_platform_impl.cc
|
| @@ -42,10 +42,13 @@
|
| #include "net/base/data_url.h"
|
| #include "net/base/mime_util.h"
|
| #include "net/base/net_errors.h"
|
| +#include "net/base/net_util.h"
|
| #include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h"
|
| #include "third_party/WebKit/public/platform/WebData.h"
|
| #include "third_party/WebKit/public/platform/WebString.h"
|
| +#include "third_party/WebKit/public/platform/WebURL.h"
|
| #include "third_party/WebKit/public/platform/WebWaitableEvent.h"
|
| +#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
|
| #include "ui/base/layout.h"
|
|
|
| #if defined(OS_ANDROID)
|
| @@ -151,6 +154,13 @@ class ConvertableToTraceFormatWrapper
|
| blink::WebConvertableToTraceFormat convertable_;
|
| };
|
|
|
| +bool isHostnameReservedIPAddress(const std::string& host) {
|
| + net::IPAddressNumber address;
|
| + if (!net::ParseURLHostnameToNumber(host, &address))
|
| + return false;
|
| + return net::IsIPAddressReserved(address);
|
| +}
|
| +
|
| } // namespace
|
|
|
| static int ToMessageID(WebLocalizedString::Name name) {
|
| @@ -439,6 +449,15 @@ WebURLError BlinkPlatformImpl::cancelledError(
|
| return WebURLLoaderImpl::CreateError(unreachableURL, false, net::ERR_ABORTED);
|
| }
|
|
|
| +bool BlinkPlatformImpl::isReservedIPAddress(
|
| + const blink::WebSecurityOrigin& securityOrigin) const {
|
| + return isHostnameReservedIPAddress(securityOrigin.host().utf8());
|
| +}
|
| +
|
| +bool BlinkPlatformImpl::isReservedIPAddress(const blink::WebURL& url) const {
|
| + return isHostnameReservedIPAddress(GURL(url).host());
|
| +}
|
| +
|
| blink::WebThread* BlinkPlatformImpl::createThread(const char* name) {
|
| return new WebThreadImpl(name);
|
| }
|
|
|