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

Side by Side Diff: ash/common/system/chromeos/network/network_icon.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 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 | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/network_icon.h" 5 #include "ash/common/system/chromeos/network/network_icon.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/chromeos/network/network_icon_animation.h" 8 #include "ash/common/system/chromeos/network/network_icon_animation.h"
9 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h" 9 #include "ash/common/system/chromeos/network/network_icon_animation_observer.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 : *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 921 : *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
922 IDR_AURA_UBER_TRAY_NETWORK_VPN); 922 IDR_AURA_UBER_TRAY_NETWORK_VPN);
923 } 923 }
924 924
925 base::string16 GetLabelForNetwork(const chromeos::NetworkState* network, 925 base::string16 GetLabelForNetwork(const chromeos::NetworkState* network,
926 IconType icon_type) { 926 IconType icon_type) {
927 DCHECK(network); 927 DCHECK(network);
928 std::string activation_state = network->activation_state(); 928 std::string activation_state = network->activation_state();
929 if (icon_type == ICON_TYPE_LIST) { 929 if (icon_type == ICON_TYPE_LIST) {
930 // Show "<network>: [Connecting|Activating|Reconnecting]..." 930 // Show "<network>: [Connecting|Activating|Reconnecting]..."
931 // TODO(varkha): Remaining states should migrate to secondary status in the
932 // network item and no longer be part of the label.
931 if (network->IsReconnecting()) { 933 if (network->IsReconnecting()) {
932 return l10n_util::GetStringFUTF16( 934 return l10n_util::GetStringFUTF16(
933 IDS_ASH_STATUS_TRAY_NETWORK_LIST_RECONNECTING, 935 IDS_ASH_STATUS_TRAY_NETWORK_LIST_RECONNECTING,
934 base::UTF8ToUTF16(network->name())); 936 base::UTF8ToUTF16(network->name()));
935 } 937 }
936 if (network->IsConnectingState()) { 938 if (!UseMd() && network->IsConnectingState()) {
bruthig 2016/12/20 20:26:01 It appears that this code path is used during OOBE
varkha 2016/12/20 20:58:56 Makes me wonder if it should use ICON_TYPE_DEFAULT
varkha 2016/12/20 21:41:09 It looked like adding a value to the enum was simp
937 return l10n_util::GetStringFUTF16( 939 return l10n_util::GetStringFUTF16(
938 IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING, 940 IDS_ASH_STATUS_TRAY_NETWORK_LIST_CONNECTING,
939 base::UTF8ToUTF16(network->name())); 941 base::UTF8ToUTF16(network->name()));
940 } 942 }
941 if (activation_state == shill::kActivationStateActivating) { 943 if (activation_state == shill::kActivationStateActivating) {
942 return l10n_util::GetStringFUTF16( 944 return l10n_util::GetStringFUTF16(
943 IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING, 945 IDS_ASH_STATUS_TRAY_NETWORK_LIST_ACTIVATING,
944 base::UTF8ToUTF16(network->name())); 946 base::UTF8ToUTF16(network->name()));
945 } 947 }
946 // Show "Activate <network>" in list view only. 948 // Show "Activate <network>" in list view only.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 iter != networks.end(); ++iter) { 1088 iter != networks.end(); ++iter) {
1087 network_paths.insert((*iter)->path()); 1089 network_paths.insert((*iter)->path());
1088 } 1090 }
1089 PurgeIconMap(ICON_TYPE_TRAY, network_paths); 1091 PurgeIconMap(ICON_TYPE_TRAY, network_paths);
1090 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); 1092 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
1091 PurgeIconMap(ICON_TYPE_LIST, network_paths); 1093 PurgeIconMap(ICON_TYPE_LIST, network_paths);
1092 } 1094 }
1093 1095
1094 } // namespace network_icon 1096 } // namespace network_icon
1095 } // namespace ash 1097 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698