| 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/policy_applicator.h" | 5 #include "chromeos/network/policy_applicator.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::string type; | 249 std::string type; |
| 250 policy.GetStringWithoutPathExpansion(::onc::network_config::kType, &type); | 250 policy.GetStringWithoutPathExpansion(::onc::network_config::kType, &type); |
| 251 if (type == ::onc::network_type::kEthernet && | 251 if (type == ::onc::network_type::kEthernet && |
| 252 profile_.type() == NetworkProfile::TYPE_USER) { | 252 profile_.type() == NetworkProfile::TYPE_USER) { |
| 253 const base::DictionaryValue* ethernet = NULL; | 253 const base::DictionaryValue* ethernet = NULL; |
| 254 policy.GetDictionaryWithoutPathExpansion(::onc::network_config::kEthernet, | 254 policy.GetDictionaryWithoutPathExpansion(::onc::network_config::kEthernet, |
| 255 ðernet); | 255 ðernet); |
| 256 std::string auth; | 256 std::string auth; |
| 257 ethernet->GetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, | 257 ethernet->GetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, |
| 258 &auth); | 258 &auth); |
| 259 if (auth == ::onc::ethernet::kNone) | 259 if (auth == ::onc::ethernet::kAuthenticationNone) |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 | 262 |
| 263 if (write_later) | 263 if (write_later) |
| 264 new_shill_configurations_.push_back(shill_dictionary.DeepCopy()); | 264 new_shill_configurations_.push_back(shill_dictionary.DeepCopy()); |
| 265 else | 265 else |
| 266 handler_->CreateConfigurationFromPolicy(shill_dictionary); | 266 handler_->CreateConfigurationFromPolicy(shill_dictionary); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void PolicyApplicator::GetPropertiesForUnmanagedEntry( | 269 void PolicyApplicator::GetPropertiesForUnmanagedEntry( |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 VLOG(1) << "Creating new configuration managed by policy " << *it | 337 VLOG(1) << "Creating new configuration managed by policy " << *it |
| 338 << " in profile " << profile_.ToDebugString() << "."; | 338 << " in profile " << profile_.ToDebugString() << "."; |
| 339 | 339 |
| 340 scoped_ptr<base::DictionaryValue> shill_dictionary = | 340 scoped_ptr<base::DictionaryValue> shill_dictionary = |
| 341 policy_util::CreateShillConfiguration(profile_, *it, policy, NULL); | 341 policy_util::CreateShillConfiguration(profile_, *it, policy, NULL); |
| 342 WriteNewShillConfiguration(*shill_dictionary, *policy, false); | 342 WriteNewShillConfiguration(*shill_dictionary, *policy, false); |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace chromeos | 346 } // namespace chromeos |
| OLD | NEW |