| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 void NetworkCertMigrator::NetworkListChanged() { | 256 void NetworkCertMigrator::NetworkListChanged() { |
| 257 if (!CertLoader::Get()->certificates_loaded()) { | 257 if (!CertLoader::Get()->certificates_loaded()) { |
| 258 VLOG(2) << "Certs not loaded yet."; | 258 VLOG(2) << "Certs not loaded yet."; |
| 259 return; | 259 return; |
| 260 } | 260 } |
| 261 // Run the migration process from deprecated CaCertNssProperties to CaCertPem. | 261 // Run the migration process from deprecated CaCertNssProperties to CaCertPem. |
| 262 VLOG(2) << "Start NSS nickname to PEM migration."; | 262 VLOG(2) << "Start NSS nickname to PEM migration."; |
| 263 scoped_refptr<MigrationTask> helper(new MigrationTask( | 263 scoped_refptr<MigrationTask> helper(new MigrationTask( |
| 264 CertLoader::Get()->cert_list(), weak_ptr_factory_.GetWeakPtr())); | 264 CertLoader::Get()->cert_list(), weak_ptr_factory_.GetWeakPtr())); |
| 265 NetworkStateHandler::NetworkStateList networks; | 265 NetworkStateHandler::NetworkStateList networks; |
| 266 network_state_handler_->GetNetworkList(&networks); | 266 network_state_handler_->GetVisibleNetworkList(&networks); |
| 267 helper->Run(networks); | 267 helper->Run(networks); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void NetworkCertMigrator::OnCertificatesLoaded( | 270 void NetworkCertMigrator::OnCertificatesLoaded( |
| 271 const net::CertificateList& cert_list, | 271 const net::CertificateList& cert_list, |
| 272 bool initial_load) { | 272 bool initial_load) { |
| 273 // Maybe there are networks referring to certs (by NSS nickname) that were not | 273 // Maybe there are networks referring to certs (by NSS nickname) that were not |
| 274 // loaded before but are now. | 274 // loaded before but are now. |
| 275 NetworkListChanged(); | 275 NetworkListChanged(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 } // namespace chromeos | 278 } // namespace chromeos |
| OLD | NEW |