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

Unified Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 650074: New network menu button UI for ChromeOS.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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: chrome/browser/chromeos/cros/network_library.cc
===================================================================
--- chrome/browser/chromeos/cros/network_library.cc (revision 39463)
+++ chrome/browser/chromeos/cros/network_library.cc (working copy)
@@ -387,4 +387,15 @@
return ethernet_connected() || wifi_connected() || cellular_connected();
}
+const std::string& NetworkLibrary::IPAddress() const {
+ // Returns highest priority IP address.
+ if (ethernet_connected())
+ return ethernet_.ip_address;
+ if (wifi_connected())
+ return wifi_.ip_address;
+ if (cellular_connected())
+ return cellular_.ip_address;
+ return ethernet_.ip_address;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698