| 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/net/onc_utils.h" | 5 #include "chrome/browser/chromeos/net/onc_utils.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (type != ::onc::network_type::kEthernet) | 332 if (type != ::onc::network_type::kEthernet) |
| 333 continue; | 333 continue; |
| 334 | 334 |
| 335 const base::DictionaryValue* ethernet = NULL; | 335 const base::DictionaryValue* ethernet = NULL; |
| 336 network->GetDictionaryWithoutPathExpansion(::onc::network_config::kEthernet, | 336 network->GetDictionaryWithoutPathExpansion(::onc::network_config::kEthernet, |
| 337 ðernet); | 337 ðernet); |
| 338 | 338 |
| 339 std::string auth; | 339 std::string auth; |
| 340 ethernet->GetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, | 340 ethernet->GetStringWithoutPathExpansion(::onc::ethernet::kAuthentication, |
| 341 &auth); | 341 &auth); |
| 342 if (auth == ::onc::ethernet::kNone) | 342 if (auth == ::onc::ethernet::kAuthenticationNone) |
| 343 return network; | 343 return network; |
| 344 } | 344 } |
| 345 return NULL; | 345 return NULL; |
| 346 } | 346 } |
| 347 | 347 |
| 348 const base::DictionaryValue* GetNetworkConfigForNetworkFromOnc( | 348 const base::DictionaryValue* GetNetworkConfigForNetworkFromOnc( |
| 349 const base::ListValue& network_configs, | 349 const base::ListValue& network_configs, |
| 350 const NetworkState& network) { | 350 const NetworkState& network) { |
| 351 // In all cases except Ethernet, we use the GUID of |network|. | 351 // In all cases except Ethernet, we use the GUID of |network|. |
| 352 if (!network.Matches(NetworkTypePattern::Ethernet())) | 352 if (!network.Matches(NetworkTypePattern::Ethernet())) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 const PrefService* local_state_prefs, | 447 const PrefService* local_state_prefs, |
| 448 const NetworkState& network) { | 448 const NetworkState& network) { |
| 449 ::onc::ONCSource ignored_onc_source; | 449 ::onc::ONCSource ignored_onc_source; |
| 450 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( | 450 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( |
| 451 profile_prefs, local_state_prefs, network, &ignored_onc_source); | 451 profile_prefs, local_state_prefs, network, &ignored_onc_source); |
| 452 return policy != NULL; | 452 return policy != NULL; |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace onc | 455 } // namespace onc |
| 456 } // namespace chromeos | 456 } // namespace chromeos |
| OLD | NEW |