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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 : certs_(certs), | 70 : certs_(certs), |
71 cert_migrator_(cert_migrator) { | 71 cert_migrator_(cert_migrator) { |
72 } | 72 } |
73 | 73 |
74 void Run(const NetworkStateHandler::NetworkStateList& networks) { | 74 void Run(const NetworkStateHandler::NetworkStateList& networks) { |
75 // Request properties for each network that has a CaCertNssProperty set | 75 // Request properties for each network that has a CaCertNssProperty set |
76 // or which could be configured with a client certificate. | 76 // or which could be configured with a client certificate. |
77 for (NetworkStateHandler::NetworkStateList::const_iterator it = | 77 for (NetworkStateHandler::NetworkStateList::const_iterator it = |
78 networks.begin(); it != networks.end(); ++it) { | 78 networks.begin(); it != networks.end(); ++it) { |
79 if (!(*it)->HasCACertNSS() && | 79 if (!(*it)->HasCACertNSS() && |
80 (*it)->security() != shill::kSecurity8021x && | 80 (*it)->security_class() != shill::kSecurity8021x && |
81 (*it)->type() != shill::kTypeVPN && | 81 (*it)->type() != shill::kTypeVPN && |
82 (*it)->type() != shill::kTypeEthernetEap) { | 82 (*it)->type() != shill::kTypeEthernetEap) { |
83 continue; | 83 continue; |
84 } | 84 } |
85 const std::string& service_path = (*it)->path(); | 85 const std::string& service_path = (*it)->path(); |
86 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( | 86 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( |
87 dbus::ObjectPath(service_path), | 87 dbus::ObjectPath(service_path), |
88 base::Bind(&network_handler::GetPropertiesCallback, | 88 base::Bind(&network_handler::GetPropertiesCallback, |
89 base::Bind(&MigrationTask::MigrateNetwork, this), | 89 base::Bind(&MigrationTask::MigrateNetwork, this), |
90 network_handler::ErrorCallback(), | 90 network_handler::ErrorCallback(), |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 void NetworkCertMigrator::OnCertificatesLoaded( | 353 void NetworkCertMigrator::OnCertificatesLoaded( |
354 const net::CertificateList& cert_list, | 354 const net::CertificateList& cert_list, |
355 bool initial_load) { | 355 bool initial_load) { |
356 // Maybe there are networks referring to certs that were not loaded before but | 356 // Maybe there are networks referring to certs that were not loaded before but |
357 // are now. | 357 // are now. |
358 NetworkListChanged(); | 358 NetworkListChanged(); |
359 } | 359 } |
360 | 360 |
361 } // namespace chromeos | 361 } // namespace chromeos |
OLD | NEW |