blob: 9d11797e7ebc352f116e0723974a5ee785bed7b4 [file] [log] [blame]
quiche271c6cca2014-12-20 03:57:531// 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.
4
maxbogue53381b62016-11-01 17:17:475#include "components/sync_wifi/wifi_security_class.h"
quiche271c6cca2014-12-20 03:57:536
7#include "third_party/cros_system_api/dbus/service_constants.h"
8
maxbogue53381b62016-11-01 17:17:479namespace sync_wifi {
quiche271c6cca2014-12-20 03:57:5310
11WifiSecurityClass 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;
22}
23
maxbogue53381b62016-11-01 17:17:4724} // namespace sync_wifi