Index: net/nqe/network_id.h |
diff --git a/net/nqe/network_id.h b/net/nqe/network_id.h |
index cf8ceac9bf77563345159aac672020b786fe7164..4620ce3bd92b9f81ad5804cf810149aba8a4368e 100644 |
--- a/net/nqe/network_id.h |
+++ b/net/nqe/network_id.h |
@@ -11,6 +11,10 @@ |
#include "net/base/net_export.h" |
#include "net/base/network_change_notifier.h" |
+namespace { |
+const char kValueSeparator[] = ","; |
+} |
+ |
namespace net { |
namespace nqe { |
namespace internal { |
@@ -38,6 +42,11 @@ struct NET_EXPORT_PRIVATE NetworkID { |
return std::tie(type, id) < std::tie(other.type, other.id); |
} |
+ std::string ToString() const { |
+ return id + kValueSeparator + |
+ NetworkChangeNotifier::ConnectionTypeToString(type); |
+ } |
+ |
// Connection type of the network. |
NetworkChangeNotifier::ConnectionType type; |