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

Unified Diff: content/child/blink_platform_impl.cc

Issue 852573002: Tag SecurityContext objects as being hosted in reserved IP ranges. [2/2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 b2432e1059702aa56a6b60038b7f12c9b8f23847..e0f565e46c43dead5e54925f088112f265af0de5 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -154,13 +154,6 @@ 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) {
@@ -498,12 +491,11 @@ WebURLError BlinkPlatformImpl::cancelledError(
}
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());
+ const blink::WebString& host) const {
+ net::IPAddressNumber address;
+ if (!net::ParseURLHostnameToNumber(host.utf8(), &address))
+ return false;
+ return net::IsIPAddressReserved(address);
}
blink::WebThread* BlinkPlatformImpl::createThread(const char* name) {
« 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