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

Unified Diff: net/nqe/network_id.h

Issue 2322183002: Add Network Quality Estimator (NQE) pref manager (Closed)
Patch Set: Rebased, Addressed kundaji comments Created 4 years, 3 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/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 +
bengr 2016/09/22 23:35:46 It seems like overill to define kValueSeparator. I
tbansal1 2016/09/23 17:10:32 The value separator is going to be used soon (in t
bengr 2016/09/23 20:31:06 Nah. If you're gonna use it, keep it.
tbansal1 2016/09/23 20:50:13 Acknowledged.
+ NetworkChangeNotifier::ConnectionTypeToString(type);
+ }
+
// Connection type of the network.
NetworkChangeNotifier::ConnectionType type;

Powered by Google App Engine
This is Rietveld 408576698