| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 LOG(ERROR) << "Profile " << profile_.ToDebugString() | 89 LOG(ERROR) << "Profile " << profile_.ToDebugString() |
| 90 << " doesn't contain the property " | 90 << " doesn't contain the property " |
| 91 << shill::kEntriesProperty; | 91 << shill::kEntriesProperty; |
| 92 NotifyConfigurationHandlerAndFinish(); | 92 NotifyConfigurationHandlerAndFinish(); |
| 93 return; | 93 return; |
| 94 } | 94 } |
| 95 | 95 |
| 96 for (base::ListValue::const_iterator it = entries->begin(); | 96 for (base::ListValue::const_iterator it = entries->begin(); |
| 97 it != entries->end(); ++it) { | 97 it != entries->end(); ++it) { |
| 98 std::string entry; | 98 std::string entry; |
| 99 (*it)->GetAsString(&entry); | 99 it->GetAsString(&entry); |
| 100 | 100 |
| 101 pending_get_entry_calls_.insert(entry); | 101 pending_get_entry_calls_.insert(entry); |
| 102 DBusThreadManager::Get()->GetShillProfileClient()->GetEntry( | 102 DBusThreadManager::Get()->GetShillProfileClient()->GetEntry( |
| 103 dbus::ObjectPath(profile_.path), | 103 dbus::ObjectPath(profile_.path), |
| 104 entry, | 104 entry, |
| 105 base::Bind(&PolicyApplicator::GetEntryCallback, | 105 base::Bind(&PolicyApplicator::GetEntryCallback, |
| 106 weak_ptr_factory_.GetWeakPtr(), | 106 weak_ptr_factory_.GetWeakPtr(), |
| 107 entry), | 107 entry), |
| 108 base::Bind(&PolicyApplicator::GetEntryError, | 108 base::Bind(&PolicyApplicator::GetEntryError, |
| 109 weak_ptr_factory_.GetWeakPtr(), | 109 weak_ptr_factory_.GetWeakPtr(), |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 331 } |
| 332 remaining_policies_.clear(); | 332 remaining_policies_.clear(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() { | 335 void PolicyApplicator::NotifyConfigurationHandlerAndFinish() { |
| 336 weak_ptr_factory_.InvalidateWeakPtrs(); | 336 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 337 handler_->OnPoliciesApplied(profile_); | 337 handler_->OnPoliciesApplied(profile_); |
| 338 } | 338 } |
| 339 | 339 |
| 340 } // namespace chromeos | 340 } // namespace chromeos |
| OLD | NEW |