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/chromeos/network/network_icon.h" | 5 #include "ash/system/chromeos/network/network_icon.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/chromeos/network/network_icon_animation.h" | 8 #include "ash/system/chromeos/network/network_icon_animation.h" |
9 #include "ash/system/chromeos/network/network_icon_animation_observer.h" | 9 #include "ash/system/chromeos/network/network_icon_animation_observer.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 connecting_network = | 776 connecting_network = |
777 state_handler->ConnectingNetworkByType(flimflam::kTypeVPN); | 777 state_handler->ConnectingNetworkByType(flimflam::kTypeVPN); |
778 } | 778 } |
779 | 779 |
780 const NetworkState* network; | 780 const NetworkState* network; |
781 // If we are connecting to a network, and there is either no connected | 781 // If we are connecting to a network, and there is either no connected |
782 // network, or the connection was user requested, use the connecting | 782 // network, or the connection was user requested, use the connecting |
783 // network. | 783 // network. |
784 if (connecting_network && | 784 if (connecting_network && |
785 (!connected_network || | 785 (!connected_network || |
786 state_handler->connecting_network() == connecting_network->path() || | |
787 connect_handler->HasConnectingNetwork(connecting_network->path()))) { | 786 connect_handler->HasConnectingNetwork(connecting_network->path()))) { |
788 network = connecting_network; | 787 network = connecting_network; |
789 } else { | 788 } else { |
790 network = connected_network; | 789 network = connected_network; |
791 } | 790 } |
792 | 791 |
793 // Don't show ethernet in the tray | 792 // Don't show ethernet in the tray |
794 if (icon_type == ICON_TYPE_TRAY && | 793 if (icon_type == ICON_TYPE_TRAY && |
795 network && network->type() == flimflam::kTypeEthernet) { | 794 network && network->type() == flimflam::kTypeEthernet) { |
796 *image = gfx::ImageSkia(); | 795 *image = gfx::ImageSkia(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 iter != networks.end(); ++iter) { | 840 iter != networks.end(); ++iter) { |
842 network_paths.insert((*iter)->path()); | 841 network_paths.insert((*iter)->path()); |
843 } | 842 } |
844 PurgeIconMap(ICON_TYPE_TRAY, network_paths); | 843 PurgeIconMap(ICON_TYPE_TRAY, network_paths); |
845 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); | 844 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); |
846 PurgeIconMap(ICON_TYPE_LIST, network_paths); | 845 PurgeIconMap(ICON_TYPE_LIST, network_paths); |
847 } | 846 } |
848 | 847 |
849 } // namespace network_icon | 848 } // namespace network_icon |
850 } // namespace ash | 849 } // namespace ash |
OLD | NEW |