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

Unified Diff: net/base/host_port_pair.cc

Issue 218923002: Merge internal change: 63891842 - QuicServerId changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | net/base/host_port_pair_unittest.cc » ('j') | net/quic/quic_server_id_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_port_pair.cc
diff --git a/net/base/host_port_pair.cc b/net/base/host_port_pair.cc
index bc23a9a8621c10f47c52a14502c9007d4a3c0343..4c250ed5a90ce70d78827f47f2e1acf37d3422c6 100644
--- a/net/base/host_port_pair.cc
+++ b/net/base/host_port_pair.cc
@@ -4,6 +4,7 @@
#include "net/base/host_port_pair.h"
+#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -47,6 +48,10 @@ std::string HostPortPair::ToString() const {
}
std::string HostPortPair::HostForURL() const {
+ // TODO(rtenneti): Add support for |host| to have '\0'.
wtc 2014/04/01 22:10:58 Can you explain why |host| may have '\0'?
ramant (doing other things) 2014/04/02 02:34:45 avd mentioned if host is constructed in code where
+ if (host_.find('\0') != std::string::npos) {
+ LOG(DFATAL) << "Host has a null char: " << host_;
Ryan Hamilton 2014/03/31 15:45:43 nit: how about DLOG_IF(DFATAL) ...?
ramant (doing other things) 2014/03/31 18:40:32 Fixed in https://codereview.chromium.org/216713003
ramant (doing other things) 2014/04/01 03:19:56 Hi Ryan, In net/spdy and net/quic, we are using
+ }
// Check to see if the host is an IPv6 address. If so, added brackets.
if (host_.find(':') != std::string::npos) {
DCHECK_NE(host_[0], '[');
« no previous file with comments | « no previous file | net/base/host_port_pair_unittest.cc » ('j') | net/quic/quic_server_id_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698