| 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 "ui/chromeos/network/network_icon.h" | 5 #include "ui/chromeos/network/network_icon.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chromeos/network/device_state.h" | 8 #include "chromeos/network/device_state.h" |
| 9 #include "chromeos/network/network_connection_handler.h" | 9 #include "chromeos/network/network_connection_handler.h" |
| 10 #include "chromeos/network/network_state.h" | 10 #include "chromeos/network/network_state.h" |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 return false; | 667 return false; |
| 668 } | 668 } |
| 669 | 669 |
| 670 void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) { | 670 void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) { |
| 671 DCHECK(network); | 671 DCHECK(network); |
| 672 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 672 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 673 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); | 673 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); |
| 674 | 674 |
| 675 const std::string& type = network->type(); | 675 const std::string& type = network->type(); |
| 676 if (type == shill::kTypeWifi) { | 676 if (type == shill::kTypeWifi) { |
| 677 if (network->security() != shill::kSecurityNone && | 677 if (network->security_class() != shill::kSecurityNone && |
| 678 IconTypeIsDark(icon_type_)) { | 678 IconTypeIsDark(icon_type_)) { |
| 679 badges->bottom_right = rb.GetImageSkiaNamed( | 679 badges->bottom_right = rb.GetImageSkiaNamed( |
| 680 IDR_AURA_UBER_TRAY_NETWORK_SECURE_DARK); | 680 IDR_AURA_UBER_TRAY_NETWORK_SECURE_DARK); |
| 681 } | 681 } |
| 682 } else if (type == shill::kTypeWimax) { | 682 } else if (type == shill::kTypeWimax) { |
| 683 technology_badge_ = rb.GetImageSkiaNamed( | 683 technology_badge_ = rb.GetImageSkiaNamed( |
| 684 IconTypeIsDark(icon_type_) ? | 684 IconTypeIsDark(icon_type_) ? |
| 685 IDR_AURA_UBER_TRAY_NETWORK_4G_DARK : | 685 IDR_AURA_UBER_TRAY_NETWORK_4G_DARK : |
| 686 IDR_AURA_UBER_TRAY_NETWORK_4G_LIGHT); | 686 IDR_AURA_UBER_TRAY_NETWORK_4G_LIGHT); |
| 687 } else if (type == shill::kTypeCellular) { | 687 } else if (type == shill::kTypeCellular) { |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 iter != networks.end(); ++iter) { | 953 iter != networks.end(); ++iter) { |
| 954 network_paths.insert((*iter)->path()); | 954 network_paths.insert((*iter)->path()); |
| 955 } | 955 } |
| 956 PurgeIconMap(ICON_TYPE_TRAY, network_paths); | 956 PurgeIconMap(ICON_TYPE_TRAY, network_paths); |
| 957 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); | 957 PurgeIconMap(ICON_TYPE_DEFAULT_VIEW, network_paths); |
| 958 PurgeIconMap(ICON_TYPE_LIST, network_paths); | 958 PurgeIconMap(ICON_TYPE_LIST, network_paths); |
| 959 } | 959 } |
| 960 | 960 |
| 961 } // namespace network_icon | 961 } // namespace network_icon |
| 962 } // namespace ui | 962 } // namespace ui |
| OLD | NEW |