Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(986)

Side by Side Diff: chromeos/network/network_cert_migrator.cc

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/network/managed_network_configuration_handler_unittest.cc ('k') | chromeos/network/network_cert_migrator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698