Ash network icons: Remove unused label code and strings

In the new feature pod tray re-factoring, some strings and code that are
no longer in use got left behind, this cleans them up.

network_icon::GetLabelForNetwork was only getting called with icon_type
ICON_TYPE_MENU_LIST, and GetDefaultLabel was unused.

Bug: 862420
Change-Id: I538c9f65fe68df56c116a8be70c75cfb5c10f07c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614141
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661520}
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd
index d17d579..abbf7f8 100644
--- a/ash/ash_strings.grd
+++ b/ash/ash_strings.grd
@@ -887,7 +887,7 @@
         Show network list. <ph name="STATE_TEXT">$1<ex>Connected to public wifi</ex></ph>
       </message>
 
-      <!-- Status Tray Network strings -->
+      <!-- Status Tray Bluetooth strings -->
       <message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PINCODE" desc="Bluetooth pairing message typically shown on a request from a 2.0 device that has a keyboard.">
         Bluetooth device "<ph name="DEVICE_NAME">$1<ex>Nexus S</ex></ph>" would like permission to pair. Please enter this PIN code on that device: <ph name="PINCODE">$2<ex>123456</ex></ph>
       </message>
@@ -1230,18 +1230,12 @@
       <message name="IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING" desc="Message for the network tray tooltip and network list when connecting to a network.">
         Connecting to <ph name="NAME">$1<ex>GoogleGuest</ex></ph>
       </message>
-      <message name="IDS_ASH_STATUS_TRAY_NETWORK_RECONNECTING" desc="Message for the network tray tooltip and network list when reconnecting to a network.">
-        Reconnecting to <ph name="NAME">$1<ex>Company VPN</ex></ph>
-      </message>
       <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATE" desc="Message for the network list to activate the network.">
         Activate <ph name="NETWORKSERVICE">$1<ex>YBH Cellular</ex></ph>
       </message>
       <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING" desc="Message for the network list when activating a network.">
         <ph name="NAME">$1<ex>YBH Cellular</ex></ph>: Activating...
       </message>
-      <message name="IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING" desc="Message for the network list when connecting to a network.">
-        <ph name="NAME">$1<ex>GoogleGuest</ex></ph>: Connecting...
-      </message>
       <message name="IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED" desc="Description in status area or network list when no network is connected.">
         No network
       </message>
diff --git a/ash/system/network/active_network_icon.cc b/ash/system/network/active_network_icon.cc
index 1c4a604..42fc426 100644
--- a/ash/system/network/active_network_icon.cc
+++ b/ash/system/network/active_network_icon.cc
@@ -86,16 +86,6 @@
                      base::Unretained(this), connector));
 }
 
-base::string16 ActiveNetworkIcon::GetDefaultLabel(
-    network_icon::IconType icon_type) {
-  if (!default_network_) {
-    if (cellular_uninitialized_msg_ != 0)
-      return l10n_util::GetStringUTF16(cellular_uninitialized_msg_);
-    return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED);
-  }
-  return network_icon::GetLabelForNetwork(*default_network_, icon_type);
-}
-
 gfx::ImageSkia ActiveNetworkIcon::GetSingleImage(
     network_icon::IconType icon_type,
     bool* animating) {
diff --git a/ash/system/network/active_network_icon.h b/ash/system/network/active_network_icon.h
index c9e3429..70904b5 100644
--- a/ash/system/network/active_network_icon.h
+++ b/ash/system/network/active_network_icon.h
@@ -37,8 +37,8 @@
 //    a technology badge is used to represent the network.
 // ** Cellular (enabled devices only): The state of the Cellular connection if
 //    available regardless of whether it is the active network.
-// NOTE : GetSingleDefaultImage and GetDefaultLabel are partially tested in
-// network_icon_unittest.cc, and partially in active_network_icon_unittest.cc.
+// NOTE : GetSingleDefaultImage is partially tested in network_icon_unittest.cc,
+// and partially in active_network_icon_unittest.cc.
 // TODO(stevenjb): Move all test coverage to active_network_icon_unittest.cc and
 // test Dual icon methods.
 // This class is also responsible for periodically purging the icon cache.
@@ -48,9 +48,6 @@
   explicit ActiveNetworkIcon(service_manager::Connector* connector);
   ~ActiveNetworkIcon() override;
 
-  // Returns the label for the primary active network..
-  base::string16 GetDefaultLabel(network_icon::IconType icon_type);
-
   // Single image mode. Returns a network icon (which may be empty) and sets
   // |animating| if provided.
   gfx::ImageSkia GetSingleImage(network_icon::IconType icon_type,
diff --git a/ash/system/network/active_network_icon_unittest.cc b/ash/system/network/active_network_icon_unittest.cc
index 52cb2e5..a354f41 100644
--- a/ash/system/network/active_network_icon_unittest.cc
+++ b/ash/system/network/active_network_icon_unittest.cc
@@ -166,24 +166,6 @@
   DISALLOW_COPY_AND_ASSIGN(ActiveNetworkIconTest);
 };
 
-TEST_F(ActiveNetworkIconTest, GetDefaultLabel) {
-  SetupCellular(shill::kStateOnline);
-  base::string16 label = active_network_icon()->GetDefaultLabel(icon_type());
-  // Note: The guid is used for the name in ConfigureService.
-  EXPECT_EQ(l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED,
-                                       base::UTF8ToUTF16("cellular_guid")),
-            label);
-
-  SetupWiFi(shill::kStateIdle);
-  network_state_handler()->SetNetworkConnectRequested(wifi_path(), true);
-  base::RunLoop().RunUntilIdle();
-  label = active_network_icon()->GetDefaultLabel(icon_type());
-  // Note: The guid is used for the name in ConfigureService.
-  EXPECT_EQ(l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING,
-                                       base::UTF8ToUTF16("wifi_guid")),
-            label);
-}
-
 TEST_F(ActiveNetworkIconTest, GetSingleImage) {
   // Cellular only = Cellular icon
   SetupCellular(shill::kStateOnline);
@@ -234,11 +216,6 @@
 TEST_F(ActiveNetworkIconTest, CellularUninitialized) {
   SetCellularUninitialized(false /* scanning */);
 
-  base::string16 label = active_network_icon()->GetDefaultLabel(icon_type());
-  EXPECT_EQ(
-      l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR),
-      label);
-
   bool animating;
   gfx::ImageSkia image =
       active_network_icon()->GetSingleImage(icon_type(), &animating);
@@ -254,10 +231,6 @@
   ASSERT_TRUE(network_state_handler()->GetScanningByType(
       chromeos::NetworkTypePattern::Cellular()));
 
-  base::string16 label = active_network_icon()->GetDefaultLabel(icon_type());
-  EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_MOBILE_SCANNING),
-            label);
-
   bool animating;
   gfx::ImageSkia image =
       active_network_icon()->GetSingleImage(icon_type(), &animating);
diff --git a/ash/system/network/network_icon.cc b/ash/system/network/network_icon.cc
index 4d4ac1c..564908e 100644
--- a/ash/system/network/network_icon.cc
+++ b/ash/system/network/network_icon.cc
@@ -581,42 +581,17 @@
   return CreateNetworkIconImage(icon, badges);
 }
 
-base::string16 GetLabelForNetwork(const NetworkIconState& network,
-                                  IconType icon_type) {
+base::string16 GetLabelForNetworkList(const NetworkIconState& network) {
   ActivationStateType activation_state = network.activation_state;
-  if (icon_type == ICON_TYPE_LIST || icon_type == ICON_TYPE_MENU_LIST) {
-    // Show "<network>: [Connecting|Activating]..."
-    if (icon_type != ICON_TYPE_MENU_LIST && IsConnecting(network)) {
-      return l10n_util::GetStringFUTF16(
-          IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING,
-          base::UTF8ToUTF16(network.name));
-    }
-    if (activation_state == ActivationStateType::kActivating) {
-      return l10n_util::GetStringFUTF16(
-          IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING,
-          base::UTF8ToUTF16(network.name));
-    }
-    // Show "Activate <network>" in list view only.
-    if (activation_state == ActivationStateType::kNotActivated ||
-        activation_state == ActivationStateType::kPartiallyActivated) {
-      return l10n_util::GetStringFUTF16(
-          IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATE,
-          base::UTF8ToUTF16(network.name));
-    }
-  } else {
-    // Show "[Connected to|Connecting to|Activating] <network>" (non-list view).
-    if (IsConnected(network)) {
-      return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED,
-                                        base::UTF8ToUTF16(network.name));
-    }
-    if (IsConnecting(network)) {
-      return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING,
-                                        base::UTF8ToUTF16(network.name));
-    }
-    if (activation_state == ActivationStateType::kActivating) {
-      return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_ACTIVATING,
-                                        base::UTF8ToUTF16(network.name));
-    }
+  if (activation_state == ActivationStateType::kActivating) {
+    return l10n_util::GetStringFUTF16(
+        IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING,
+        base::UTF8ToUTF16(network.name));
+  }
+  if (activation_state == ActivationStateType::kNotActivated ||
+      activation_state == ActivationStateType::kPartiallyActivated) {
+    return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATE,
+                                      base::UTF8ToUTF16(network.name));
   }
 
   // Otherwise just show the network name or 'Ethernet'.
diff --git a/ash/system/network/network_icon.h b/ash/system/network/network_icon.h
index 4ff01b3..caca2ed 100644
--- a/ash/system/network/network_icon.h
+++ b/ash/system/network/network_icon.h
@@ -107,10 +107,9 @@
 ASH_EXPORT gfx::ImageSkia GetImageForNewWifiNetwork(SkColor icon_color,
                                                     SkColor badge_color);
 
-// Returns the label for |network| based on |icon_type|. |network| cannot be
-// nullptr.
-ASH_EXPORT base::string16 GetLabelForNetwork(const NetworkIconState&,
-                                             IconType icon_type);
+// Returns the label for |network| when displayed in a list.
+ASH_EXPORT base::string16 GetLabelForNetworkList(
+    const NetworkIconState& network);
 
 // Called periodically with the current list of network guids. Removes cached
 // entries that are no longer in the list.
diff --git a/ash/system/network/network_icon_unittest.cc b/ash/system/network/network_icon_unittest.cc
index 01f69d6c..c57f397 100644
--- a/ash/system/network/network_icon_unittest.cc
+++ b/ash/system/network/network_icon_unittest.cc
@@ -99,12 +99,8 @@
     return GetImageForNonVirtualNetwork(network, false /* show_vpn_badge */);
   }
 
-  void GetDefaultNetworkImageAndLabel(IconType icon_type,
-                                      gfx::ImageSkia* image,
-                                      base::string16* label,
-                                      bool* animating) {
-    *image = active_network_icon_->GetSingleImage(icon_type, animating);
-    *label = active_network_icon_->GetDefaultLabel(icon_type);
+  gfx::ImageSkia GetDefaultNetworkImage(IconType icon_type, bool* animating) {
+    return active_network_icon_->GetSingleImage(icon_type, animating);
   }
 
   // The icon for a Tether network should be the same as one for a cellular
@@ -236,18 +232,15 @@
   EXPECT_EQ(SignalStrength::STRONG, GetSignalStrength(100));
 }
 
-TEST_F(NetworkIconTest, DefaultImageAndLabelWifiConnected) {
+TEST_F(NetworkIconTest, DefaultImageWifiConnected) {
   // Set the Wifi service as connected.
   SetServiceProperty(wifi1_path(), shill::kSignalStrengthProperty,
                      base::Value(45));
   SetServiceProperty(wifi1_path(), shill::kStateProperty,
                      base::Value(shill::kStateOnline));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -258,18 +251,15 @@
       gfx::Image(default_image), ImageForNetwork(reference_network.get())));
 }
 
-TEST_F(NetworkIconTest, DefaultImageAndLabelWifiConnecting) {
+TEST_F(NetworkIconTest, DefaultImageWifiConnecting) {
   // Set the Wifi service as connected.
   SetServiceProperty(wifi1_path(), shill::kSignalStrengthProperty,
                      base::Value(45));
   SetServiceProperty(wifi1_path(), shill::kStateProperty,
                      base::Value(shill::kStateAssociation));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 
@@ -286,7 +276,7 @@
 // connected, but that is not always the case. For example, if the connected
 // wifi service has no Internet connectivity, cellular service will be selected
 // as default.
-TEST_F(NetworkIconTest, DefaultImageAndLabelCellularDefaultWithWifiConnected) {
+TEST_F(NetworkIconTest, DefaultImageCellularDefaultWithWifiConnected) {
   // Set both wifi and cellular networks in a connected state, but with wifi not
   // online - this should prompt fake shill manager implementation to prefer
   // cellular network over wifi.
@@ -300,11 +290,8 @@
   SetServiceProperty(cellular_path(), shill::kStateProperty,
                      base::Value(shill::kStateOnline));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -334,14 +321,11 @@
   SetServiceProperty(wifi1_path(), shill::kStateProperty,
                      base::Value(shill::kStateAssociation));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
-  bool animating = false;
   // Verify that the default network is connecting icon for the initial default
   // network (even though the default network as reported by shill actually
   // changed).
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  bool animating = false;
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 
@@ -364,8 +348,7 @@
   NetworkStatePropertiesPtr reference_network_2 =
       CreateStandaloneNetworkProperties("reference2", NetworkType::kCellular,
                                         ConnectionStateType::kOnline, 65);
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -380,8 +363,7 @@
   NetworkStatePropertiesPtr reference_network_3 =
       CreateStandaloneNetworkProperties("reference3", NetworkType::kWiFi,
                                         ConnectionStateType::kOnline, 45);
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -405,11 +387,8 @@
   SetServiceProperty(wifi1_path(), shill::kStateProperty,
                      base::Value(shill::kStateIdle));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -438,15 +417,12 @@
   SetServiceProperty(cellular_path(), shill::kStateProperty,
                      base::Value(shill::kStateAssociation));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
-  bool animating = false;
   // Currently, a connecting icon is used as default network icon even if
   // another network connected and used as default.
   // TODO(tbarzic): Consider changing network icon logic to use a connected
   //     network icon if a network is connected while a network is reconnecting.
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  bool animating = false;
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 
@@ -461,8 +437,7 @@
   SetServiceProperty(cellular_path(), shill::kStateProperty,
                      base::Value(shill::kStateReady));
 
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
   NetworkStatePropertiesPtr reference_network_2 =
@@ -476,8 +451,7 @@
   SetServiceProperty(cellular_path(), shill::kStateProperty,
                      base::Value(shill::kStateOnline));
 
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
   EXPECT_TRUE(gfx::test::AreImagesEqual(
@@ -498,11 +472,8 @@
   SetServiceProperty(cellular_path(), shill::kStateProperty,
                      base::Value(shill::kStateOnline));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -521,11 +492,8 @@
   SetServiceProperty(cellular_path(), shill::kActivationStateProperty,
                      base::Value(shill::kActivationStateActivating));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -550,11 +518,8 @@
   SetServiceProperty(cellular_path(), shill::kActivationStateProperty,
                      base::Value(shill::kActivationStateActivating));
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -567,10 +532,6 @@
 
 // Tests VPN badging for the default network.
 TEST_F(NetworkIconTest, DefaultNetworkVpnBadge) {
-  gfx::ImageSkia default_image;
-  base::string16 label;
-  bool animating = false;
-
   // Set up initial state with Ethernet and WiFi connected.
   std::string ethernet_path = ConfigureService(
       R"({"GUID": "ethernet_guid", "Type": "ethernet", "State": "online"})");
@@ -582,8 +543,8 @@
                      base::Value(45));
 
   // With Ethernet and WiFi connected, the default icon should be empty.
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  bool animating = false;
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_TRUE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -593,8 +554,7 @@
   ASSERT_FALSE(vpn_path.empty());
 
   // When a VPN is connected, the default icon should be Ethernet with a badge.
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -613,8 +573,7 @@
   // Disconnect Ethernet. The default icon should become WiFi with a badge.
   SetServiceProperty(ethernet_path, shill::kStateProperty,
                      base::Value(shill::kStateIdle));
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_FALSE(animating);
 
@@ -628,8 +587,7 @@
   // Set the VPN to connecting; the default icon should be animating.
   SetServiceProperty(vpn_path, shill::kStateProperty,
                      base::Value(shill::kStateAssociation));
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 }
@@ -645,11 +603,8 @@
       R"({"GUID": "vpn_guid", "Type": "vpn", "State": "online"})");
   ASSERT_FALSE(vpn_path.empty());
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 
@@ -672,11 +627,8 @@
       R"({"GUID": "vpn_guid", "Type": "vpn", "State": "online"})");
   ASSERT_FALSE(vpn_path.empty());
 
-  gfx::ImageSkia default_image;
-  base::string16 label;
   bool animating = false;
-  GetDefaultNetworkImageAndLabel(icon_type_, &default_image, &label,
-                                 &animating);
+  gfx::ImageSkia default_image = GetDefaultNetworkImage(icon_type_, &animating);
   ASSERT_FALSE(default_image.isNull());
   EXPECT_TRUE(animating);
 
diff --git a/ash/system/network/network_list.cc b/ash/system/network/network_list.cc
index a523665..4d4e422 100644
--- a/ash/system/network/network_list.cc
+++ b/ash/system/network/network_list.cc
@@ -160,8 +160,7 @@
     auto info = std::make_unique<NetworkInfo>(network->guid);
 
     network_icon::NetworkIconState network_icon_state(network.get());
-    info->label = network_icon::GetLabelForNetwork(
-        network_icon_state, network_icon::ICON_TYPE_MENU_LIST);
+    info->label = network_icon::GetLabelForNetworkList(network_icon_state);
     // |network_list_| only contains non virtual networks.
     info->image = network_icon::GetImageForNonVirtualNetwork(
         network_icon_state, network_icon::ICON_TYPE_LIST,
diff --git a/ash/system/network/vpn_list_view.cc b/ash/system/network/vpn_list_view.cc
index f6ec4b4..5a13107 100644
--- a/ash/system/network/vpn_list_view.cc
+++ b/ash/system/network/vpn_list_view.cc
@@ -240,8 +240,7 @@
   network_icon::NetworkIconState vpn_icon_state(vpn);
   gfx::ImageSkia image = network_icon::GetImageForVPN(
       vpn_icon_state, network_icon::ICON_TYPE_LIST);
-  base::string16 label = network_icon::GetLabelForNetwork(
-      vpn_icon_state, network_icon::ICON_TYPE_MENU_LIST);
+  base::string16 label = network_icon::GetLabelForNetworkList(vpn_icon_state);
   AddIconAndLabel(image, label);
   if (chromeos::network_config::StateIsConnected(vpn->connection_state)) {
     owner_->SetupConnectedScrollListItem(this);