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

Unified Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.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: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index f0eb6ecff9e5770039857846f64aa80eaca1c794..c79d5bde7775d4d63d0408ded6cce56853f5aff2 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -438,7 +438,7 @@ NetworkInfoDictionary::NetworkInfoDictionary(const NetworkState* network,
shared_(false),
activation_state_(network->activation_state()),
policy_managed_(network->IsManaged()) {
- if (network->type() == flimflam::kTypeEthernet)
+ if (network->IsTypeEthernet())
name_ = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
gfx::ImageSkia icon = ash::network_icon::GetImageForNetwork(
network, ash::network_icon::ICON_TYPE_LIST);
@@ -456,7 +456,7 @@ NetworkInfoDictionary::NetworkInfoDictionary(const FavoriteState* favorite,
remembered_(true),
shared_(!favorite->IsPrivate()),
policy_managed_(favorite->IsManaged()) {
- if (favorite->type() == flimflam::kTypeEthernet)
+ if (favorite->IsTypeEthernet())
name_ = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
gfx::ImageSkia icon = ash::network_icon::GetImageForDisconnectedNetwork(
ash::network_icon::ICON_TYPE_LIST, favorite->type());
@@ -1535,10 +1535,10 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
dictionary.SetBoolean(kTagShowProxy, !network->profile_path().empty());
// Enable static ip config for ethernet. For wifi, enable if flag is set.
- bool staticIPConfig = type == flimflam::kTypeEthernet ||
- (type == flimflam::kTypeWifi &&
- CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kEnableStaticIPConfig));
+ bool staticIPConfig = network->IsTypeEthernet() ||
+ (type == flimflam::kTypeWifi &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kEnableStaticIPConfig));
dictionary.SetBoolean(kTagShowStaticIPConfig, staticIPConfig);
dictionary.SetBoolean(kTagShowPreferred, !network->profile_path().empty());

Powered by Google App Engine
This is Rietveld 408576698