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

Unified Diff: ash/system/chromeos/network/network_icon.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
« no previous file with comments | « no previous file | ash/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/network_icon.cc
diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc
index 6ac05a7c0a01f08a9f8e290a3a38d313080bb1b7..d2402de63e7951522915f72d72a9fc8356ed4006 100644
--- a/ash/system/chromeos/network/network_icon.cc
+++ b/ash/system/chromeos/network/network_icon.cc
@@ -23,8 +23,9 @@
#include "ui/gfx/size_conversions.h"
using chromeos::DeviceState;
-using chromeos::NetworkStateHandler;
+using chromeos::NetworkHandler;
using chromeos::NetworkState;
+using chromeos::NetworkStateHandler;
namespace ash {
namespace network_icon {
@@ -444,7 +445,7 @@ gfx::ImageSkia GetIcon(const NetworkState* network,
// Get connecting images
gfx::ImageSkia GetConnectingVpnImage(IconType icon_type) {
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
const NetworkState* connected_network = NULL;
if (icon_type == ICON_TYPE_TRAY) {
connected_network = handler->ConnectedNetworkByType(
@@ -546,8 +547,8 @@ bool NetworkIconImpl::UpdateCellularState(const NetworkState* network) {
}
bool NetworkIconImpl::UpdateVPNBadge() {
- const NetworkState* vpn =
- NetworkStateHandler::Get()->ConnectedNetworkByType(flimflam::kTypeVPN);
+ const NetworkState* vpn = NetworkHandler::Get()->network_state_handler()->
+ ConnectedNetworkByType(flimflam::kTypeVPN);
if (vpn && vpn_badge_ == NULL) {
vpn_badge_ = BadgeForVPN(icon_type_);
return true;
@@ -561,7 +562,7 @@ bool NetworkIconImpl::UpdateVPNBadge() {
void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
DCHECK(network);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
const std::string& type = network->type();
if (type == flimflam::kTypeWifi) {
@@ -691,7 +692,7 @@ int GetCellularUninitializedMsg() {
static base::Time s_uninitialized_state_time;
static int s_uninitialized_msg(0);
- NetworkStateHandler* handler = NetworkStateHandler::Get();
+ NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
if (handler->GetTechnologyState(NetworkStateHandler::kMatchTypeMobile)
== NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) {
s_uninitialized_msg = IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR;
« no previous file with comments | « no previous file | ash/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698