Chromium Code Reviews| Index: webrtc/base/network.h |
| diff --git a/webrtc/base/network.h b/webrtc/base/network.h |
| index 680c005ea29ace284f9aae3c7bf4c07f9694f6a0..b788332d4d303ee4642cb90558b381a396254cb3 100644 |
| --- a/webrtc/base/network.h |
| +++ b/webrtc/base/network.h |
| @@ -339,6 +339,9 @@ class Network { |
| AdapterType type() const { return type_; } |
| void set_type(AdapterType type) { type_ = type; } |
| + // Converts the key to an integer id. |
| + int id() const { return static_cast<int>(std::hash<std::string>()(key_)); } |
|
pthatcher1
2016/03/16 21:22:02
We should probably make this a uint16_t or uint32_
honghaiz3
2016/03/17 03:38:26
Done.
|
| + |
| int preference() const { return preference_; } |
| void set_preference(int preference) { preference_ = preference; } |