| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/policy/network_configuration_updater_impl_cros
.h" | 5 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl_cros
.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // network configuration. | 155 // network configuration. |
| 156 if (!policy_value->GetAsString(&onc_blob)) { | 156 if (!policy_value->GetAsString(&onc_blob)) { |
| 157 LOG(WARNING) << "ONC policy for source " | 157 LOG(WARNING) << "ONC policy for source " |
| 158 << chromeos::onc::GetSourceAsString(onc_source) | 158 << chromeos::onc::GetSourceAsString(onc_source) |
| 159 << " is not a string value."; | 159 << " is not a string value."; |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 | 162 |
| 163 base::ListValue network_configs; | 163 base::ListValue network_configs; |
| 164 base::ListValue certificates; | 164 base::ListValue certificates; |
| 165 ParseAndValidateOncForImport( | 165 chromeos::onc::ParseAndValidateOncForImport( |
| 166 onc_blob, onc_source, "", &network_configs, &certificates); | 166 onc_blob, onc_source, "", &network_configs, &certificates); |
| 167 | 167 |
| 168 network_library_->LoadOncNetworks(network_configs, onc_source); | 168 network_library_->LoadOncNetworks(network_configs, onc_source); |
| 169 | 169 |
| 170 scoped_ptr<net::CertificateList> web_trust_certs(new net::CertificateList); | 170 scoped_ptr<net::CertificateList> web_trust_certs(new net::CertificateList); |
| 171 certificate_handler_->ImportCertificates( | 171 certificate_handler_->ImportCertificates( |
| 172 certificates, onc_source, web_trust_certs.get()); | 172 certificates, onc_source, web_trust_certs.get()); |
| 173 | 173 |
| 174 if (onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY) | 174 if (onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY) |
| 175 SetTrustAnchors(web_trust_certs.Pass()); | 175 SetTrustAnchors(web_trust_certs.Pass()); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace policy | 178 } // namespace policy |
| OLD | NEW |