OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 #include "base/compiler_specific.h" |
12 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
15 #include "base/memory/singleton.h" | 16 #include "base/memory/singleton.h" |
16 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
17 #include "base/string16.h" | 18 #include "base/string16.h" |
18 #include "base/timer.h" | 19 #include "base/timer.h" |
19 #include "third_party/cros/chromeos_network.h" | 20 #include "third_party/cros/chromeos_network.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 const std::string& client_cert_id() const { return client_cert_id_; } | 816 const std::string& client_cert_id() const { return client_cert_id_; } |
816 const std::string& username() const { return username_; } | 817 const std::string& username() const { return username_; } |
817 const std::string& user_passphrase() const { return user_passphrase_; } | 818 const std::string& user_passphrase() const { return user_passphrase_; } |
818 const std::string& group_name() const { return group_name_; } | 819 const std::string& group_name() const { return group_name_; } |
819 | 820 |
820 // Sets the well-known PKCS#11 slot and PIN for accessing certificates. | 821 // Sets the well-known PKCS#11 slot and PIN for accessing certificates. |
821 void SetCertificateSlotAndPin( | 822 void SetCertificateSlotAndPin( |
822 const std::string& slot, const std::string& pin); | 823 const std::string& slot, const std::string& pin); |
823 | 824 |
824 // Network overrides. | 825 // Network overrides. |
825 virtual bool RequiresUserProfile() const; | 826 virtual bool RequiresUserProfile() const OVERRIDE; |
826 virtual void CopyCredentialsFromRemembered(Network* remembered); | 827 virtual void CopyCredentialsFromRemembered(Network* remembered) OVERRIDE; |
827 | 828 |
828 // Public getters. | 829 // Public getters. |
829 bool NeedMoreInfoToConnect() const; | 830 bool NeedMoreInfoToConnect() const; |
830 std::string GetProviderTypeString() const; | 831 std::string GetProviderTypeString() const; |
831 | 832 |
832 // Public setters. | 833 // Public setters. |
833 void SetCACertNSS(const std::string& ca_cert_nss); | 834 void SetCACertNSS(const std::string& ca_cert_nss); |
834 void SetL2TPIPsecPSKCredentials(const std::string& psk_passphrase, | 835 void SetL2TPIPsecPSKCredentials(const std::string& psk_passphrase, |
835 const std::string& username, | 836 const std::string& username, |
836 const std::string& user_passphrase, | 837 const std::string& user_passphrase, |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 void SetEAPClientCertPkcs11Id(const std::string& pkcs11_id); | 1147 void SetEAPClientCertPkcs11Id(const std::string& pkcs11_id); |
1147 void SetEAPUseSystemCAs(bool use_system_cas); | 1148 void SetEAPUseSystemCAs(bool use_system_cas); |
1148 void SetEAPIdentity(const std::string& identity); | 1149 void SetEAPIdentity(const std::string& identity); |
1149 void SetEAPAnonymousIdentity(const std::string& identity); | 1150 void SetEAPAnonymousIdentity(const std::string& identity); |
1150 void SetEAPPassphrase(const std::string& passphrase); | 1151 void SetEAPPassphrase(const std::string& passphrase); |
1151 | 1152 |
1152 // Sets the well-known PKCS#11 PIN for accessing certificates. | 1153 // Sets the well-known PKCS#11 PIN for accessing certificates. |
1153 void SetCertificatePin(const std::string& pin); | 1154 void SetCertificatePin(const std::string& pin); |
1154 | 1155 |
1155 // Network overrides. | 1156 // Network overrides. |
1156 virtual bool RequiresUserProfile() const; | 1157 virtual bool RequiresUserProfile() const OVERRIDE; |
1157 | 1158 |
1158 // Return a string representation of the encryption code. | 1159 // Return a string representation of the encryption code. |
1159 // This not translated and should be only used for debugging purposes. | 1160 // This not translated and should be only used for debugging purposes. |
1160 std::string GetEncryptionString() const; | 1161 std::string GetEncryptionString() const; |
1161 | 1162 |
1162 // Return true if a passphrase or other input is required to connect. | 1163 // Return true if a passphrase or other input is required to connect. |
1163 bool IsPassphraseRequired() const; | 1164 bool IsPassphraseRequired() const; |
1164 | 1165 |
1165 private: | 1166 private: |
1166 // This allows NativeWifiNetworkParser access to device privates so | 1167 // This allows NativeWifiNetworkParser access to device privates so |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 const std::string& service_path) = 0; | 1734 const std::string& service_path) = 0; |
1734 | 1735 |
1735 // Factory function, creates a new instance and returns ownership. | 1736 // Factory function, creates a new instance and returns ownership. |
1736 // For normal usage, access the singleton via CrosLibrary::Get(). | 1737 // For normal usage, access the singleton via CrosLibrary::Get(). |
1737 static NetworkLibrary* GetImpl(bool stub); | 1738 static NetworkLibrary* GetImpl(bool stub); |
1738 }; | 1739 }; |
1739 | 1740 |
1740 } // namespace chromeos | 1741 } // namespace chromeos |
1741 | 1742 |
1742 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1743 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
OLD | NEW |