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

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

Issue 23712002: Cleanup network type matching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/network_icon.cc
diff --git a/ash/system/chromeos/network/network_icon.cc b/ash/system/chromeos/network/network_icon.cc
index efe7e07afc4665d94faa0632db855717734c9f86..74f02762c15ef7c63dc5643b68625ed1147c3c1f 100644
--- a/ash/system/chromeos/network/network_icon.cc
+++ b/ash/system/chromeos/network/network_icon.cc
@@ -464,7 +464,7 @@ gfx::ImageSkia GetIcon(const NetworkState* network,
int strength_index) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
const std::string& type = network->type();
- if (type == flimflam::kTypeEthernet) {
+ if (network->IsTypeEthernet()) {
return *rb.GetImageSkiaNamed(IDR_AURA_UBER_TRAY_NETWORK_WIRED);
} else if (type == flimflam::kTypeWifi ||
type == flimflam::kTypeWimax ||
@@ -545,7 +545,7 @@ void NetworkIconImpl::Update(const NetworkState* network) {
}
const std::string& type = network->type();
- if (type != flimflam::kTypeEthernet)
+ if (!network->IsTypeEthernet())
dirty |= UpdateWirelessStrengthIndex(network);
if (type == flimflam::kTypeCellular)
@@ -725,7 +725,7 @@ base::string16 GetLabelForNetwork(const chromeos::NetworkState* network,
}
// Otherwise just show the network name or 'Ethernet'.
- if (network->type() == flimflam::kTypeEthernet) {
+ if (network->IsTypeEthernet()) {
return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ETHERNET);
} else {
return UTF8ToUTF16(network->name());
@@ -790,8 +790,7 @@ void GetDefaultNetworkImageAndLabel(IconType icon_type,
}
// Don't show ethernet in the tray
- if (icon_type == ICON_TYPE_TRAY &&
- network && network->type() == flimflam::kTypeEthernet) {
+ if (icon_type == ICON_TYPE_TRAY && network && network->IsTypeEthernet()) {
*image = gfx::ImageSkia();
*animating = false;
return;

Powered by Google App Engine
This is Rietveld 408576698