OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ | 5 #ifndef CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ |
6 #define CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ | 6 #define CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // |shill_properties| if the certificate pattern |pattern| could be resolved. | 52 // |shill_properties| if the certificate pattern |pattern| could be resolved. |
53 // Returns false otherwise and sets empty Shill properties to clear the | 53 // Returns false otherwise and sets empty Shill properties to clear the |
54 // certificate configuration. | 54 // certificate configuration. |
55 static bool ResolveCertificatePatternSync( | 55 static bool ResolveCertificatePatternSync( |
56 const client_cert::ConfigType client_cert_type, | 56 const client_cert::ConfigType client_cert_type, |
57 const CertificatePattern& pattern, | 57 const CertificatePattern& pattern, |
58 base::DictionaryValue* shill_properties); | 58 base::DictionaryValue* shill_properties); |
59 | 59 |
60 private: | 60 private: |
61 // NetworkStateHandlerObserver overrides | 61 // NetworkStateHandlerObserver overrides |
62 virtual void NetworkListChanged() OVERRIDE; | 62 virtual void NetworkListChanged() override; |
63 | 63 |
64 // CertLoader::Observer overrides | 64 // CertLoader::Observer overrides |
65 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, | 65 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, |
66 bool initial_load) OVERRIDE; | 66 bool initial_load) override; |
67 | 67 |
68 // NetworkPolicyObserver overrides | 68 // NetworkPolicyObserver overrides |
69 virtual void PolicyApplied(const std::string& service_path) OVERRIDE; | 69 virtual void PolicyApplied(const std::string& service_path) override; |
70 | 70 |
71 // Check which networks of |networks| are configured with a client certificate | 71 // Check which networks of |networks| are configured with a client certificate |
72 // pattern. Search for certificates, on the worker thread, and configure the | 72 // pattern. Search for certificates, on the worker thread, and configure the |
73 // networks for which a matching cert is found (see ConfigureCertificates). | 73 // networks for which a matching cert is found (see ConfigureCertificates). |
74 void ResolveNetworks(const NetworkStateHandler::NetworkStateList& networks); | 74 void ResolveNetworks(const NetworkStateHandler::NetworkStateList& networks); |
75 | 75 |
76 // |matches| contains networks for which a matching certificate was found. | 76 // |matches| contains networks for which a matching certificate was found. |
77 // Configures these networks. | 77 // Configures these networks. |
78 void ConfigureCertificates(std::vector<NetworkAndMatchingCert>* matches); | 78 void ConfigureCertificates(std::vector<NetworkAndMatchingCert>* matches); |
79 | 79 |
(...skipping 11 matching lines...) Expand all Loading... |
91 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_; | 91 scoped_refptr<base::TaskRunner> slow_task_runner_for_test_; |
92 | 92 |
93 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_; | 93 base::WeakPtrFactory<ClientCertResolver> weak_ptr_factory_; |
94 | 94 |
95 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver); | 95 DISALLOW_COPY_AND_ASSIGN(ClientCertResolver); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace chromeos | 98 } // namespace chromeos |
99 | 99 |
100 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ | 100 #endif // CHROMEOS_NETWORK_CLIENT_CERT_RESOLVER_H_ |
OLD | NEW |