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 #include "chromeos/network/network_cert_migrator.h" | 5 #include "chromeos/network/network_cert_migrator.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 MigrationTask(const net::CertificateList& certs, | 38 MigrationTask(const net::CertificateList& certs, |
39 const base::WeakPtr<NetworkCertMigrator>& cert_migrator) | 39 const base::WeakPtr<NetworkCertMigrator>& cert_migrator) |
40 : certs_(certs), | 40 : certs_(certs), |
41 cert_migrator_(cert_migrator) { | 41 cert_migrator_(cert_migrator) { |
42 } | 42 } |
43 | 43 |
44 void Run(const NetworkStateHandler::NetworkStateList& networks) { | 44 void Run(const NetworkStateHandler::NetworkStateList& networks) { |
45 // Request properties for each network that could be configured with a | 45 // Request properties for each network that could be configured with a |
46 // client certificate. | 46 // client certificate. |
47 for (const NetworkState* network : networks) { | 47 for (const NetworkState* network : networks) { |
48 if (network->security() != shill::kSecurity8021x && | 48 if (network->security_class() != shill::kSecurity8021x && |
49 network->type() != shill::kTypeVPN && | 49 network->type() != shill::kTypeVPN && |
50 network->type() != shill::kTypeEthernetEap) { | 50 network->type() != shill::kTypeEthernetEap) { |
51 continue; | 51 continue; |
52 } | 52 } |
53 const std::string& service_path = network->path(); | 53 const std::string& service_path = network->path(); |
54 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( | 54 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( |
55 dbus::ObjectPath(service_path), | 55 dbus::ObjectPath(service_path), |
56 base::Bind(&network_handler::GetPropertiesCallback, | 56 base::Bind(&network_handler::GetPropertiesCallback, |
57 base::Bind(&MigrationTask::MigrateNetwork, this), | 57 base::Bind(&MigrationTask::MigrateNetwork, this), |
58 network_handler::ErrorCallback(), | 58 network_handler::ErrorCallback(), |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } | 199 } |
200 | 200 |
201 void NetworkCertMigrator::OnCertificatesLoaded( | 201 void NetworkCertMigrator::OnCertificatesLoaded( |
202 const net::CertificateList& cert_list, | 202 const net::CertificateList& cert_list, |
203 bool initial_load) { | 203 bool initial_load) { |
204 if (initial_load) | 204 if (initial_load) |
205 NetworkListChanged(); | 205 NetworkListChanged(); |
206 } | 206 } |
207 | 207 |
208 } // namespace chromeos | 208 } // namespace chromeos |
OLD | NEW |