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

Unified Diff: net/base/network_change_notifier.h

Issue 1416213003: Add DatagramClientSocket::BindToDefaultNetwork(),GetBoundNetwork() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « net/android/network_change_notifier_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.h
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 4290331cddf259652a26253a3aa797a2fa69f011..217eda3fa66e5bf70df5adef7938b371d9a5faa5 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -303,14 +303,14 @@ class NET_EXPORT NetworkChangeNotifier {
// CONNECTION_UNKNOWN when unimplemented.
static ConnectionType GetNetworkConnectionType(NetworkHandle network);
- // Returns the device's current default network connection. This is the
+ // Determines the device's current default network connection. This is the
// network used for newly created socket communication for sockets that are
// not explicitly bound to a particular network (e.g. via
- // DatagramClientSocket.BindToNetwork). Returns |kInvalidNetworkHandle| if
- // there is no default connected network.
- // Only implemented for Android (Lollipop and newer), returns
- // |kInvalidNetworkHandle| when unimplemented.
- static NetworkHandle GetDefaultNetwork();
+ // DatagramClientSocket.BindToNetwork). Sets |*network| to the default network
+ // or |kInvalidNetworkHandle| if there is no default connected network.
+ // Only implemented for Android (Lollipop and newer).
+ // Returns a net error code.
+ static int GetDefaultNetwork(NetworkHandle* network);
// Retrieve the last read DnsConfig. This could be expensive if the system has
// a large HOSTS file.
@@ -484,7 +484,7 @@ class NET_EXPORT NetworkChangeNotifier {
virtual void GetCurrentConnectedNetworks(NetworkList* network_list) const;
virtual ConnectionType GetCurrentNetworkConnectionType(
NetworkHandle network) const;
- virtual NetworkHandle GetCurrentDefaultNetwork() const;
+ virtual int GetCurrentDefaultNetwork(NetworkHandle* network) const;
// Broadcasts a notification to all registered observers. Note that this
// happens asynchronously, even for observers on the current thread, even in
« no previous file with comments | « net/android/network_change_notifier_android.cc ('k') | net/base/network_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698