| 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_sync/wifi_credential.h" | 5 #include "components/wifi_sync/wifi_credential.h" |
| 6 | 6 |
| 7 #include "base/i18n/streaming_utf8_validator.h" | 7 #include "base/i18n/streaming_utf8_validator.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "components/onc/onc_constants.h" | 12 #include "components/onc/onc_constants.h" |
| 13 | 13 |
| 14 namespace wifi_sync { | 14 namespace wifi_sync { |
| 15 | 15 |
| 16 WifiCredential::WifiCredential(const WifiCredential& other) = default; |
| 17 |
| 16 WifiCredential::~WifiCredential() { | 18 WifiCredential::~WifiCredential() { |
| 17 } | 19 } |
| 18 | 20 |
| 19 // static | 21 // static |
| 20 scoped_ptr<WifiCredential> WifiCredential::Create( | 22 scoped_ptr<WifiCredential> WifiCredential::Create( |
| 21 const SsidBytes& ssid, | 23 const SsidBytes& ssid, |
| 22 WifiSecurityClass security_class, | 24 WifiSecurityClass security_class, |
| 23 const std::string& passphrase) { | 25 const std::string& passphrase) { |
| 24 if (security_class == SECURITY_CLASS_INVALID) { | 26 if (security_class == SECURITY_CLASS_INVALID) { |
| 25 LOG(ERROR) << "SecurityClass is invalid."; | 27 LOG(ERROR) << "SecurityClass is invalid."; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 WifiCredential::WifiCredential( | 101 WifiCredential::WifiCredential( |
| 100 const std::vector<unsigned char>& ssid, | 102 const std::vector<unsigned char>& ssid, |
| 101 WifiSecurityClass security_class, | 103 WifiSecurityClass security_class, |
| 102 const std::string& passphrase) | 104 const std::string& passphrase) |
| 103 : ssid_(ssid), | 105 : ssid_(ssid), |
| 104 security_class_(security_class), | 106 security_class_(security_class), |
| 105 passphrase_(passphrase) { | 107 passphrase_(passphrase) { |
| 106 } | 108 } |
| 107 | 109 |
| 108 } // namespace wifi_sync | 110 } // namespace wifi_sync |
| OLD | NEW |