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

Side by Side Diff: ash/system/chromeos/network/network_icon.cc

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elim UpdateManagerProperties, feedback Created 6 years, 6 months 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 | Annotate | Revision Log
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/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 "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 } 963 }
964 *animating = network->IsConnectingState(); 964 *animating = network->IsConnectingState();
965 // Get icon and label for connected or connecting network. 965 // Get icon and label for connected or connecting network.
966 *image = GetImageForNetwork(network, icon_type); 966 *image = GetImageForNetwork(network, icon_type);
967 if (label) 967 if (label)
968 *label = GetLabelForNetwork(network, icon_type); 968 *label = GetLabelForNetwork(network, icon_type);
969 } 969 }
970 970
971 void PurgeNetworkIconCache() { 971 void PurgeNetworkIconCache() {
972 NetworkStateHandler::NetworkStateList networks; 972 NetworkStateHandler::NetworkStateList networks;
973 NetworkHandler::Get()->network_state_handler()->GetNetworkList(&networks); 973 NetworkHandler::Get()->network_state_handler()->GetVisibleNetworkList(
974 &networks);
974 std::set<std::string> network_paths; 975 std::set<std::string> network_paths;
975 for (NetworkStateHandler::NetworkStateList::iterator iter = networks.begin(); 976 for (NetworkStateHandler::NetworkStateList::iterator iter = networks.begin();
976 iter != networks.end(); ++iter) { 977 iter != networks.end(); ++iter) {
977 network_paths.insert((*iter)->path()); 978 network_paths.insert((*iter)->path());
978 } 979 }
979 PurgeIconMap(ICON_TYPE_TRAY, network_paths); 980 PurgeIconMap(ICON_TYPE_TRAY, network_paths);
980 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); 981 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
981 PurgeIconMap(ICON_TYPE_LIST, network_paths); 982 PurgeIconMap(ICON_TYPE_LIST, network_paths);
982 } 983 }
983 984
984 } // namespace network_icon 985 } // namespace network_icon
985 } // namespace ash 986 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698