| 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 #include "chromeos/network/client_cert_resolver.h" | 4 #include "chromeos/network/client_cert_resolver.h" |
| 5 | 5 |
| 6 #include <cert.h> | 6 #include <cert.h> |
| 7 #include <pk11pub.h> | 7 #include <pk11pub.h> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 ASSERT_TRUE(!test_pkcs11_id_.empty()); | 134 ASSERT_TRUE(!test_pkcs11_id_.empty()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SetupNetworkHandlers() { | 137 void SetupNetworkHandlers() { |
| 138 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); | 138 network_state_handler_.reset(NetworkStateHandler::InitializeForTest()); |
| 139 network_profile_handler_.reset(new NetworkProfileHandler()); | 139 network_profile_handler_.reset(new NetworkProfileHandler()); |
| 140 network_config_handler_.reset(new NetworkConfigurationHandler()); | 140 network_config_handler_.reset(new NetworkConfigurationHandler()); |
| 141 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); | 141 managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); |
| 142 client_cert_resolver_.reset(new ClientCertResolver()); | 142 client_cert_resolver_.reset(new ClientCertResolver()); |
| 143 | 143 |
| 144 network_profile_handler_->Init(network_state_handler_.get()); | 144 network_profile_handler_->Init(); |
| 145 network_config_handler_->Init(network_state_handler_.get()); | 145 network_config_handler_->Init(network_state_handler_.get()); |
| 146 managed_config_handler_->Init(network_state_handler_.get(), | 146 managed_config_handler_->Init(network_state_handler_.get(), |
| 147 network_profile_handler_.get(), | 147 network_profile_handler_.get(), |
| 148 network_config_handler_.get(), | 148 network_config_handler_.get(), |
| 149 NULL /* network_device_handler */); | 149 NULL /* network_device_handler */); |
| 150 client_cert_resolver_->Init(network_state_handler_.get(), | 150 client_cert_resolver_->Init(network_state_handler_.get(), |
| 151 managed_config_handler_.get()); | 151 managed_config_handler_.get()); |
| 152 client_cert_resolver_->SetSlowTaskRunnerForTest( | 152 client_cert_resolver_->SetSlowTaskRunnerForTest( |
| 153 message_loop_.message_loop_proxy()); | 153 message_loop_.message_loop_proxy()); |
| 154 | 154 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 base::RunLoop().RunUntilIdle(); | 289 base::RunLoop().RunUntilIdle(); |
| 290 | 290 |
| 291 // Verify that the resolver positively matched the pattern in the policy with | 291 // Verify that the resolver positively matched the pattern in the policy with |
| 292 // the test client cert and configured the network. | 292 // the test client cert and configured the network. |
| 293 std::string pkcs11_id; | 293 std::string pkcs11_id; |
| 294 GetClientCertProperties(&pkcs11_id); | 294 GetClientCertProperties(&pkcs11_id); |
| 295 EXPECT_EQ(test_pkcs11_id_, pkcs11_id); | 295 EXPECT_EQ(test_pkcs11_id_, pkcs11_id); |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace chromeos | 298 } // namespace chromeos |
| OLD | NEW |