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

Side by Side Diff: ash/common/system/chromeos/network/vpn_list_view.cc

Issue 2587133003: [ash-md] Removes "Connecting..." suffix from the network / VPN rows (Closed)
Patch Set: [ash-md] Removes 'Connecting...' suffix from the network row (nits) Created 4 years 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 unified diff | Download patch
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 if (!network) { 275 if (!network) {
276 // This is a transient state where the network has been removed already but 276 // This is a transient state where the network has been removed already but
277 // the network list in the UI has not been updated yet. 277 // the network list in the UI has not been updated yet.
278 return; 278 return;
279 } 279 }
280 RemoveAllChildViews(true); 280 RemoveAllChildViews(true);
281 disconnect_button_ = nullptr; 281 disconnect_button_ = nullptr;
282 282
283 gfx::ImageSkia image = 283 gfx::ImageSkia image =
284 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST); 284 network_icon::GetImageForNetwork(network, network_icon::ICON_TYPE_LIST);
285 base::string16 label = 285 base::string16 label = network_icon::GetLabelForNetwork(
286 network_icon::GetLabelForNetwork(network, network_icon::ICON_TYPE_LIST); 286 network, UseMd() ? network_icon::ICON_TYPE_MENU_LIST
287 : network_icon::ICON_TYPE_LIST);
287 if (UseMd()) { 288 if (UseMd()) {
288 if (network->IsConnectedState()) 289 if (network->IsConnectedState())
289 SetupConnectedItemMd(label, image); 290 SetupConnectedItemMd(label, image);
290 else if (network->IsConnectingState()) 291 else if (network->IsConnectingState())
291 SetupConnectingItemMd(label, image); 292 SetupConnectingItemMd(label, image);
292 else 293 else
293 AddIconAndLabel(image, label, false); 294 AddIconAndLabel(image, label, false);
294 295
295 if (network->IsConnectedState()) { 296 if (network->IsConnectedState()) {
296 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton( 297 disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton(
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 } 523 }
523 } 524 }
524 525
525 // Add providers without any configured networks, in the order that the 526 // Add providers without any configured networks, in the order that the
526 // providers were returned by the extensions system. 527 // providers were returned by the extensions system.
527 for (const VPNProvider& provider : providers) 528 for (const VPNProvider& provider : providers)
528 AddProviderAndNetworks(provider, networks); 529 AddProviderAndNetworks(provider, networks);
529 } 530 }
530 531
531 } // namespace ash 532 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698