OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_connection_handler_impl.h" | 5 #include "chromeos/network/network_connection_handler_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void NetworkConnectionHandlerImpl::Init( | 134 void NetworkConnectionHandlerImpl::Init( |
135 NetworkStateHandler* network_state_handler, | 135 NetworkStateHandler* network_state_handler, |
136 NetworkConfigurationHandler* network_configuration_handler, | 136 NetworkConfigurationHandler* network_configuration_handler, |
137 ManagedNetworkConfigurationHandler* managed_network_configuration_handler) { | 137 ManagedNetworkConfigurationHandler* managed_network_configuration_handler) { |
138 if (LoginState::IsInitialized()) | 138 if (LoginState::IsInitialized()) |
139 LoginState::Get()->AddObserver(this); | 139 LoginState::Get()->AddObserver(this); |
140 | 140 |
141 if (CertLoader::IsInitialized()) { | 141 if (CertLoader::IsInitialized()) { |
142 cert_loader_ = CertLoader::Get(); | 142 cert_loader_ = CertLoader::Get(); |
143 cert_loader_->AddObserver(this); | 143 cert_loader_->AddObserver(this); |
144 if (cert_loader_->certificates_loaded()) { | 144 if (cert_loader_->initial_load_finished()) { |
145 NET_LOG_EVENT("Certificates Loaded", ""); | 145 NET_LOG_EVENT("Certificates Loaded", ""); |
146 certificates_loaded_ = true; | 146 certificates_loaded_ = true; |
147 } | 147 } |
148 } else { | 148 } else { |
149 // TODO(tbarzic): Require a mock or stub cert_loader in tests. | 149 // TODO(tbarzic): Require a mock or stub cert_loader in tests. |
150 NET_LOG_EVENT("Certificate Loader not initialized", ""); | 150 NET_LOG_EVENT("Certificate Loader not initialized", ""); |
151 certificates_loaded_ = true; | 151 certificates_loaded_ = true; |
152 } | 152 } |
153 | 153 |
154 if (network_state_handler) { | 154 if (network_state_handler) { |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 | 778 |
779 void NetworkConnectionHandlerImpl::HandleShillDisconnectSuccess( | 779 void NetworkConnectionHandlerImpl::HandleShillDisconnectSuccess( |
780 const std::string& service_path, | 780 const std::string& service_path, |
781 const base::Closure& success_callback) { | 781 const base::Closure& success_callback) { |
782 NET_LOG_EVENT("Disconnect Request Sent", service_path); | 782 NET_LOG_EVENT("Disconnect Request Sent", service_path); |
783 if (!success_callback.is_null()) | 783 if (!success_callback.is_null()) |
784 success_callback.Run(); | 784 success_callback.Run(); |
785 } | 785 } |
786 | 786 |
787 } // namespace chromeos | 787 } // namespace chromeos |
OLD | NEW |