OLD | NEW |
---|---|
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/system/network/network_icon.h" | 5 #include "ash/system/network/network_icon.h" |
6 | 6 |
7 #include "ash/resources/vector_icons/vector_icons.h" | 7 #include "ash/resources/vector_icons/vector_icons.h" |
8 #include "ash/strings/grit/ash_strings.h" | 8 #include "ash/strings/grit/ash_strings.h" |
9 #include "ash/system/network/network_icon_animation.h" | 9 #include "ash/system/network/network_icon_animation.h" |
10 #include "ash/system/network/network_icon_animation_observer.h" | 10 #include "ash/system/network/network_icon_animation_observer.h" |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
874 } else { | 874 } else { |
875 return base::UTF8ToUTF16(network->name()); | 875 return base::UTF8ToUTF16(network->name()); |
876 } | 876 } |
877 } | 877 } |
878 | 878 |
879 int GetMobileUninitializedMsg() { | 879 int GetMobileUninitializedMsg() { |
880 static base::Time s_uninitialized_state_time; | 880 static base::Time s_uninitialized_state_time; |
881 static int s_uninitialized_msg(0); | 881 static int s_uninitialized_msg(0); |
882 | 882 |
883 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); | 883 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); |
884 if (handler->GetTechnologyState(NetworkTypePattern::Mobile()) == | 884 if (handler->GetTechnologyState(NetworkTypePattern::Tether()) == |
885 NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) { | 885 NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) { |
Kyle Horimoto
2017/06/27 19:36:56
This condition also occurs if IsCellularAvailableB
Kyle Horimoto
2017/06/29 19:24:32
I added a quick CL to help you on this. Use https:
lesliewatkins
2017/07/07 16:19:19
Will incorporate as soon as this lands. Thanks for
| |
886 // TODO (lesliewatkins): Add a more descriptive message (e.g. "Enable | 886 s_uninitialized_msg = IDS_ASH_STATUS_TRAY_ENABLE_BLUETOOTH; |
887 // Bluetooth") for Tether technology type. | 887 s_uninitialized_state_time = base::Time::Now(); |
888 return s_uninitialized_msg; | |
889 } else if (handler->GetTechnologyState(NetworkTypePattern::Mobile()) == | |
Kyle Horimoto
2017/06/27 19:36:56
Does this change fix https://bugs.chromium.org/p/c
lesliewatkins
2017/07/07 16:19:19
Done.
| |
890 NetworkStateHandler::TECHNOLOGY_UNINITIALIZED) { | |
888 s_uninitialized_msg = IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR; | 891 s_uninitialized_msg = IDS_ASH_STATUS_TRAY_INITIALIZING_CELLULAR; |
889 s_uninitialized_state_time = base::Time::Now(); | 892 s_uninitialized_state_time = base::Time::Now(); |
890 return s_uninitialized_msg; | 893 return s_uninitialized_msg; |
891 } else if (handler->GetScanningByType(NetworkTypePattern::Mobile())) { | 894 } else if (handler->GetScanningByType(NetworkTypePattern::Mobile())) { |
892 s_uninitialized_msg = IDS_ASH_STATUS_TRAY_MOBILE_SCANNING; | 895 s_uninitialized_msg = IDS_ASH_STATUS_TRAY_MOBILE_SCANNING; |
893 s_uninitialized_state_time = base::Time::Now(); | 896 s_uninitialized_state_time = base::Time::Now(); |
894 return s_uninitialized_msg; | 897 return s_uninitialized_msg; |
895 } | 898 } |
896 // There can be a delay between leaving the Initializing state and when | 899 // There can be a delay between leaving the Initializing state and when |
897 // a Mobile device shows up, so keep showing the initializing | 900 // a Mobile device shows up, so keep showing the initializing |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
993 network_paths.insert((*iter)->path()); | 996 network_paths.insert((*iter)->path()); |
994 } | 997 } |
995 PurgeIconMap(ICON_TYPE_TRAY, network_paths); | 998 PurgeIconMap(ICON_TYPE_TRAY, network_paths); |
996 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); | 999 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); |
997 PurgeIconMap(ICON_TYPE_LIST, network_paths); | 1000 PurgeIconMap(ICON_TYPE_LIST, network_paths); |
998 PurgeIconMap(ICON_TYPE_MENU_LIST, network_paths); | 1001 PurgeIconMap(ICON_TYPE_MENU_LIST, network_paths); |
999 } | 1002 } |
1000 | 1003 |
1001 } // namespace network_icon | 1004 } // namespace network_icon |
1002 } // namespace ash | 1005 } // namespace ash |
OLD | NEW |