| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_sync/wifi_security_class.h" | 5 #include "components/sync_wifi/wifi_security_class.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "components/onc/onc_constants.h" | 8 #include "components/onc/onc_constants.h" |
| 9 | 9 |
| 10 namespace wifi_sync { | 10 namespace sync_wifi { |
| 11 | 11 |
| 12 bool WifiSecurityClassSupportsPassphrases( | 12 bool WifiSecurityClassSupportsPassphrases( |
| 13 const WifiSecurityClass security_class) { | 13 const WifiSecurityClass security_class) { |
| 14 switch (security_class) { | 14 switch (security_class) { |
| 15 case SECURITY_CLASS_NONE: | 15 case SECURITY_CLASS_NONE: |
| 16 return false; | 16 return false; |
| 17 case SECURITY_CLASS_WEP: | 17 case SECURITY_CLASS_WEP: |
| 18 case SECURITY_CLASS_PSK: | 18 case SECURITY_CLASS_PSK: |
| 19 case SECURITY_CLASS_802_1X: | 19 case SECURITY_CLASS_802_1X: |
| 20 return true; | 20 return true; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 *security_class_string = onc::wifi::kWPA_EAP; | 79 *security_class_string = onc::wifi::kWPA_EAP; |
| 80 return true; | 80 return true; |
| 81 case SECURITY_CLASS_INVALID: | 81 case SECURITY_CLASS_INVALID: |
| 82 return false; | 82 return false; |
| 83 } | 83 } |
| 84 NOTREACHED() << "Invalid WifiSecurityClass enum with value " | 84 NOTREACHED() << "Invalid WifiSecurityClass enum with value " |
| 85 << security_class; | 85 << security_class; |
| 86 return false; | 86 return false; |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace wifi_sync | 89 } // namespace sync_wifi |
| OLD | NEW |