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

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: Rebase 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } 856 }
857 *animating = network->IsConnectingState(); 857 *animating = network->IsConnectingState();
858 // Get icon and label for connected or connecting network. 858 // Get icon and label for connected or connecting network.
859 *image = GetImageForNetwork(network, icon_type); 859 *image = GetImageForNetwork(network, icon_type);
860 if (label) 860 if (label)
861 *label = GetLabelForNetwork(network, icon_type); 861 *label = GetLabelForNetwork(network, icon_type);
862 } 862 }
863 863
864 void PurgeNetworkIconCache() { 864 void PurgeNetworkIconCache() {
865 NetworkStateHandler::NetworkStateList networks; 865 NetworkStateHandler::NetworkStateList networks;
866 NetworkHandler::Get()->network_state_handler()->GetNetworkList(&networks); 866 NetworkHandler::Get()->network_state_handler()->GetVisibleNetworkList(
867 &networks);
867 std::set<std::string> network_paths; 868 std::set<std::string> network_paths;
868 for (NetworkStateHandler::NetworkStateList::iterator iter = networks.begin(); 869 for (NetworkStateHandler::NetworkStateList::iterator iter = networks.begin();
869 iter != networks.end(); ++iter) { 870 iter != networks.end(); ++iter) {
870 network_paths.insert((*iter)->path()); 871 network_paths.insert((*iter)->path());
871 } 872 }
872 PurgeIconMap(ICON_TYPE_TRAY, network_paths); 873 PurgeIconMap(ICON_TYPE_TRAY, network_paths);
873 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); 874 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths);
874 PurgeIconMap(ICON_TYPE_LIST, network_paths); 875 PurgeIconMap(ICON_TYPE_LIST, network_paths);
875 } 876 }
876 877
877 } // namespace network_icon 878 } // namespace network_icon
878 } // namespace ash 879 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698