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

Unified Diff: third_party/WebKit/Source/platform/network/NetworkUtils.cpp

Issue 2151473002: Small improvements to MixedContentChecker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO to SecurityOrigin::isLocalhost Created 4 years, 5 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
Index: third_party/WebKit/Source/platform/network/NetworkUtils.cpp
diff --git a/third_party/WebKit/Source/platform/network/NetworkUtils.cpp b/third_party/WebKit/Source/platform/network/NetworkUtils.cpp
index 87ece834a96737bc85b85d343a20b1a742c43f43..57c0b4c7ea7822c0070c6c3fa10307bfee963020 100644
--- a/third_party/WebKit/Source/platform/network/NetworkUtils.cpp
+++ b/third_party/WebKit/Source/platform/network/NetworkUtils.cpp
@@ -5,6 +5,7 @@
#include "platform/network/NetworkUtils.h"
#include "net/base/ip_address.h"
+#include "net/base/url_util.h"
#include "wtf/text/StringUTF8Adaptor.h"
#include "wtf/text/WTFString.h"
@@ -21,6 +22,12 @@ bool isReservedIPAddress(const String& host)
return address.IsReserved();
}
+bool isLocalHostname(const String& host, bool* isLocal6)
+{
+ StringUTF8Adaptor utf8(host);
+ return net::IsLocalHostname(utf8.asStringPiece(), isLocal6);
+}
+
} // NetworkUtils
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698