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

Side by Side Diff: ui/chromeos/network/network_icon.cc

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) Created 5 years, 11 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
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 "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
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
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
OLDNEW
« no previous file with comments | « ui/chromeos/network/network_connect.cc ('k') | ui/chromeos/network/network_state_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698