Skip to content

Commit

Permalink
athena: Show a connected network in the debug status-window.
Browse files Browse the repository at this point in the history
BUG=399257
R=oshima@chromium.org

Review URL: https://codereview.chromium.org/428263005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287046 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
sadrul@chromium.org committed Aug 1, 2014
1 parent 351b41f commit 7476dcc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions athena/main/debug/debug_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/network_state_handler_observer.h"
#include "chromeos/network/network_type_pattern.h"
#include "ui/aura/window.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
Expand Down Expand Up @@ -125,6 +126,10 @@ class NetworkStatus : public chromeos::NetworkStateHandlerObserver {
chromeos::NetworkStateHandler* handler =
chromeos::NetworkHandler::Get()->network_state_handler();
const chromeos::NetworkState* network = handler->DefaultNetwork();
if (!network) {
network = handler->ConnectedNetworkByType(
chromeos::NetworkTypePattern::NonVirtual());
}
if (network) {
status = base::StringPrintf(
"%s (%s)", network->ip_address().c_str(), network->name().c_str());
Expand Down

0 comments on commit 7476dcc

Please sign in to comment.