| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/chromeos/network/vpn_list_view.h" | 5 #include "ash/common/system/chromeos/network/vpn_list_view.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 if (!network) { | 270 if (!network) { |
| 271 // This is a transient state where the network has been removed already but | 271 // This is a transient state where the network has been removed already but |
| 272 // the network list in the UI has not been updated yet. | 272 // the network list in the UI has not been updated yet. |
| 273 return; | 273 return; |
| 274 } | 274 } |
| 275 RemoveAllChildViews(true); | 275 RemoveAllChildViews(true); |
| 276 disconnect_button_ = nullptr; | 276 disconnect_button_ = nullptr; |
| 277 | 277 |
| 278 gfx::ImageSkia image = | 278 gfx::ImageSkia image = |
| 279 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); | 279 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); |
| 280 base::string16 label = | 280 base::string16 label = network_icon::GetLabelForNetwork( |
| 281 network_icon::GetLabelForNetwork(network, network_icon::ICON_TYPE_LIST); | 281 network, UseMd() ? network_icon::ICON_TYPE_MENU_LIST |
| 282 : network_icon::ICON_TYPE_LIST); |
| 282 if (UseMd()) { | 283 if (UseMd()) { |
| 283 if (network->IsConnectedState()) | 284 if (network->IsConnectedState()) |
| 284 SetupConnectedItemMd(label, image); | 285 SetupConnectedItemMd(label, image); |
| 285 else if (network->IsConnectingState()) | 286 else if (network->IsConnectingState()) |
| 286 SetupConnectingItemMd(label, image); | 287 SetupConnectingItemMd(label, image); |
| 287 else | 288 else |
| 288 AddIconAndLabel(image, label, false); | 289 AddIconAndLabel(image, label, false); |
| 289 | 290 |
| 290 if (network->IsConnectedState()) { | 291 if (network->IsConnectedState()) { |
| 291 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( | 292 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 } | 524 } |
| 524 } | 525 } |
| 525 | 526 |
| 526 // Add providers without any configured networks, in the order that the | 527 // Add providers without any configured networks, in the order that the |
| 527 // providers were returned by the extensions system. | 528 // providers were returned by the extensions system. |
| 528 for (const VPNProvider& provider : providers) | 529 for (const VPNProvider& provider : providers) |
| 529 AddProviderAndNetworks(provider.key, provider.name, networks); | 530 AddProviderAndNetworks(provider.key, provider.name, networks); |
| 530 } | 531 } |
| 531 | 532 |
| 532 } // namespace ash | 533 } // namespace ash |
| OLD | NEW |