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

Unified Diff: components/wifi_sync/wifi_security_class.h

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: address style issues from stevenjb's review of PS9 Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: components/wifi_sync/wifi_security_class.h
diff --git a/components/wifi_sync/wifi_security_class.h b/components/wifi_sync/wifi_security_class.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d98888380edcedec3ff1eb6958376188a383246
--- /dev/null
+++ b/components/wifi_sync/wifi_security_class.h
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_WIFI_SYNC_WIFI_SECURITY_CLASS_H_
+#define COMPONENTS_WIFI_SYNC_WIFI_SECURITY_CLASS_H_
+
+#if defined(OS_CHROMEOS)
+#include <string>
+#endif
+
+namespace wifi_sync {
+
+enum WifiSecurityClass {
+ SECURITY_CLASS_INVALID,
+ SECURITY_CLASS_NONE,
+ SECURITY_CLASS_WEP,
+ SECURITY_CLASS_PSK, // WPA-PSK or RSN-PSK
+ SECURITY_CLASS_802_1X, // WPA-Enterprise or RSN-Enterprise
+};
+
+#if defined(OS_CHROMEOS)
+// Converts from a Security string presented by the ChromeOS
+// connection manager ("shill") to a WifiSecurityClass enum. Returns
+// the appropriate enum value. If |security_in| is unrecognized,
+// returns SECURITY_CLASS_INVALID.
+WifiSecurityClass WifiSecurityClassFromShillSecurity(
+ const std::string& security_in);
erikwright (departed) 2014/12/08 21:21:36 It seems uncommon in Chromium to suffix with _in
mukesh agrawal 2014/12/09 01:41:11 Done.
+#endif // OS_CHROMEOS
+
+} // namespace wifi_sync
+
+#endif // COMPONENTS_WIFI_SYNC_WIFI_SECURITY_CLASS_H_

Powered by Google App Engine
This is Rietveld 408576698