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

Unified Diff: net/base/dns_util.cc

Issue 6500010: HSTS: add net-internals UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 10 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: net/base/dns_util.cc
diff --git a/net/base/dns_util.cc b/net/base/dns_util.cc
index f1e0de442babefc5a0e61c9506fc1df78929637c..f4306ab84eb06aaf27d4646266330f6db45c2b52 100644
--- a/net/base/dns_util.cc
+++ b/net/base/dns_util.cc
@@ -56,6 +56,17 @@ bool DNSDomainFromDot(const std::string& dotted, std::string* out) {
return true;
}
+std::string DNSDomainToString(const std::string& domain) {
+ std::string ret;
+
+ for (unsigned i = 0; domain[i]; i += domain[i] + 1) {
eroman 2011/02/16 20:12:45 I am concerned about bounds checking in this funct
agl 2011/02/16 22:46:22 This function assumes that the input is in DNS for
+ if (i)
+ ret += ".";
+ ret += domain.substr(i + 1, domain[i]);
+ }
+ return ret;
+}
+
bool IsSTD3ASCIIValidCharacter(char c) {
if (c <= 0x2c)
return false;

Powered by Google App Engine
This is Rietveld 408576698