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

Unified Diff: ash/system/chromeos/network/tray_vpn.cc

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos_unittests Created 7 years, 7 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: ash/system/chromeos/network/tray_vpn.cc
diff --git a/ash/system/chromeos/network/tray_vpn.cc b/ash/system/chromeos/network/tray_vpn.cc
index 2d7ab0ebfc10b4b1ffbde2653d77871f8485d55b..31c6d6a76cc926bdfa5989665366377bf26e81a4 100644
--- a/ash/system/chromeos/network/tray_vpn.cc
+++ b/ash/system/chromeos/network/tray_vpn.cc
@@ -20,6 +20,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
using chromeos::NetworkStateHandler;
@@ -42,9 +43,9 @@ class VpnDefaultView : public TrayItemMore,
static bool ShouldShow() {
// Do not show VPN line in uber tray bubble if VPN is not configured.
- NetworkStateHandler* handler = NetworkStateHandler::Get();
- const NetworkState* vpn = handler->FirstNetworkByType(
- flimflam::kTypeVPN);
+ NetworkStateHandler* handler =
+ NetworkHandler::Get()->network_state_handler();
+ const NetworkState* vpn = handler->FirstNetworkByType(flimflam::kTypeVPN);
return vpn != NULL;
}
@@ -71,7 +72,8 @@ class VpnDefaultView : public TrayItemMore,
void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
base::string16* label,
bool* animating) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler =
+ NetworkHandler::Get()->network_state_handler();
const NetworkState* vpn = handler->FirstNetworkByType(
flimflam::kTypeVPN);
if (!vpn || (vpn->connection_state() == flimflam::kStateIdle)) {
@@ -114,7 +116,7 @@ views::View* TrayVPN::CreateTrayView(user::LoginStatus status) {
views::View* TrayVPN::CreateDefaultView(user::LoginStatus status) {
CHECK(default_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
if (status == user::LOGGED_IN_NONE)
return NULL;
@@ -127,7 +129,7 @@ views::View* TrayVPN::CreateDefaultView(user::LoginStatus status) {
views::View* TrayVPN::CreateDetailedView(user::LoginStatus status) {
CHECK(detailed_ == NULL);
- if (!chromeos::NetworkStateHandler::IsInitialized())
+ if (!chromeos::NetworkHandler::IsInitialized())
return NULL;
detailed_ = new tray::NetworkStateListDetailedView(
« no previous file with comments | « ash/system/chromeos/network/tray_network_state_observer.cc ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698