| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 NotifyConfigurationHandlerAndFinish(); | 124 NotifyConfigurationHandlerAndFinish(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void PolicyApplicator::GetEntryCallback( | 127 void PolicyApplicator::GetEntryCallback( |
| 128 const std::string& entry, | 128 const std::string& entry, |
| 129 const base::DictionaryValue& entry_properties) { | 129 const base::DictionaryValue& entry_properties) { |
| 130 VLOG(2) << "Received properties for entry " << entry << " of profile " | 130 VLOG(2) << "Received properties for entry " << entry << " of profile " |
| 131 << profile_.ToDebugString(); | 131 << profile_.ToDebugString(); |
| 132 | 132 |
| 133 scoped_ptr<base::DictionaryValue> onc_part( | 133 scoped_ptr<base::DictionaryValue> onc_part( |
| 134 onc::TranslateShillServiceToONCPart( | 134 onc::TranslateShillServiceToONCPart(entry_properties, |
| 135 entry_properties, ::onc::ONC_SOURCE_UNKNOWN, | 135 ::onc::ONC_SOURCE_UNKNOWN, |
| 136 &onc::kNetworkWithStateSignature, nullptr /* network_state */)); | 136 &onc::kNetworkWithStateSignature)); |
| 137 | 137 |
| 138 std::string old_guid; | 138 std::string old_guid; |
| 139 if (!onc_part->GetStringWithoutPathExpansion(::onc::network_config::kGUID, | 139 if (!onc_part->GetStringWithoutPathExpansion(::onc::network_config::kGUID, |
| 140 &old_guid)) { | 140 &old_guid)) { |
| 141 VLOG(1) << "Entry " << entry << " of profile " << profile_.ToDebugString() | 141 VLOG(1) << "Entry " << entry << " of profile " << profile_.ToDebugString() |
| 142 << " doesn't contain a GUID."; | 142 << " doesn't contain a GUID."; |
| 143 // This might be an entry of an older ChromeOS version. Assume it to be | 143 // This might be an entry of an older ChromeOS version. Assume it to be |
| 144 // unmanaged. | 144 // unmanaged. |
| 145 } | 145 } |
| 146 | 146 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 339 } |
| 340 remaining_policies_.clear(); | 340 remaining_policies_.clear(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() { | 343 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() { |
| 344 weak_ptr_factory_.InvalidateWeakPtrs(); | 344 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 345 handler_->OnPoliciesApplied(profile_); | 345 handler_->OnPoliciesApplied(profile_); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace chromeos | 348 } // namespace chromeos |
| OLD | NEW |