Work on Windows GN component build.
[chromium-blink-merge.git] / components / wifi_sync / wifi_security_class_chromeos.cc
blob6f3b10d7bd8665a7c135fc7572a563a9aa2045b7
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
3 // found in the LICENSE file.
5 #include "components/wifi_sync/wifi_security_class.h"
7 #include "third_party/cros_system_api/dbus/service_constants.h"
9 namespace wifi_sync {
11 WifiSecurityClass WifiSecurityClassFromShillSecurity(
12 const std::string& shill_security) {
13 if (shill_security == shill::kSecurityNone)
14 return SECURITY_CLASS_NONE;
15 else if (shill_security == shill::kSecurityWep)
16 return SECURITY_CLASS_WEP;
17 else if (shill_security == shill::kSecurityPsk)
18 return SECURITY_CLASS_PSK;
19 else if (shill_security == shill::kSecurity8021x)
20 return SECURITY_CLASS_802_1X;
21 return SECURITY_CLASS_INVALID;
24 } // namespace wifi_sync