| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/wifi/wifi_service.h" | 5 #include "components/wifi/wifi_service.h" |
| 6 | 6 |
| 7 #import <netinet/in.h> | 7 #import <netinet/in.h> |
| 8 #import <CoreWLAN/CoreWLAN.h> | 8 #import <CoreWLAN/CoreWLAN.h> |
| 9 #import <SystemConfiguration/SystemConfiguration.h> | 9 #import <SystemConfiguration/SystemConfiguration.h> |
| 10 | 10 |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 switch (security) { | 516 switch (security) { |
| 517 case kCWSecurityModeWPA_Enterprise: | 517 case kCWSecurityModeWPA_Enterprise: |
| 518 case kCWSecurityModeWPA2_Enterprise: | 518 case kCWSecurityModeWPA2_Enterprise: |
| 519 return onc::wifi::kWPA_EAP; | 519 return onc::wifi::kWPA_EAP; |
| 520 case kCWSecurityModeWPA_PSK: | 520 case kCWSecurityModeWPA_PSK: |
| 521 case kCWSecurityModeWPA2_PSK: | 521 case kCWSecurityModeWPA2_PSK: |
| 522 return onc::wifi::kWPA_PSK; | 522 return onc::wifi::kWPA_PSK; |
| 523 case kCWSecurityModeWEP: | 523 case kCWSecurityModeWEP: |
| 524 return onc::wifi::kWEP_PSK; | 524 return onc::wifi::kWEP_PSK; |
| 525 case kCWSecurityModeOpen: | 525 case kCWSecurityModeOpen: |
| 526 return onc::wifi::kNone; | 526 return onc::wifi::kSecurityNone; |
| 527 // TODO(mef): Figure out correct mapping. | 527 // TODO(mef): Figure out correct mapping. |
| 528 case kCWSecurityModeWPS: | 528 case kCWSecurityModeWPS: |
| 529 case kCWSecurityModeDynamicWEP: | 529 case kCWSecurityModeDynamicWEP: |
| 530 return onc::wifi::kWPA_EAP; | 530 return onc::wifi::kWPA_EAP; |
| 531 } | 531 } |
| 532 return onc::wifi::kWPA_EAP; | 532 return onc::wifi::kWPA_EAP; |
| 533 } | 533 } |
| 534 | 534 |
| 535 Frequency WiFiServiceMac::FrequencyFromCWChannelBand(CWChannelBand band) const { | 535 Frequency WiFiServiceMac::FrequencyFromCWChannelBand(CWChannelBand band) const { |
| 536 return band == kCWChannelBand2GHz ? kFrequency2400 : kFrequency5000; | 536 return band == kCWChannelBand2GHz ? kFrequency2400 : kFrequency5000; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 NetworkGuidList changed_networks(1, network_guid); | 600 NetworkGuidList changed_networks(1, network_guid); |
| 601 message_loop_proxy_->PostTask( | 601 message_loop_proxy_->PostTask( |
| 602 FROM_HERE, | 602 FROM_HERE, |
| 603 base::Bind(networks_changed_observer_, changed_networks)); | 603 base::Bind(networks_changed_observer_, changed_networks)); |
| 604 } | 604 } |
| 605 | 605 |
| 606 // static | 606 // static |
| 607 WiFiService* WiFiService::Create() { return new WiFiServiceMac(); } | 607 WiFiService* WiFiService::Create() { return new WiFiServiceMac(); } |
| 608 | 608 |
| 609 } // namespace wifi | 609 } // namespace wifi |
| OLD | NEW |