| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <iostream> | 5 #include <iostream> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <sstream> | 7 #include <sstream> |
| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ASSERT_TRUE(entries); | 125 ASSERT_TRUE(entries); |
| 126 | 126 |
| 127 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue); | 127 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue); |
| 128 base::ListValue* entry_paths = new base::ListValue; | 128 base::ListValue* entry_paths = new base::ListValue; |
| 129 result->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths); | 129 result->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths); |
| 130 for (base::DictionaryValue::Iterator it(*entries); !it.IsAtEnd(); | 130 for (base::DictionaryValue::Iterator it(*entries); !it.IsAtEnd(); |
| 131 it.Advance()) { | 131 it.Advance()) { |
| 132 entry_paths->AppendString(it.key()); | 132 entry_paths->AppendString(it.key()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 ASSERT_TRUE(ContainsKey(profile_to_user_, profile_path.value())); | 135 ASSERT_TRUE(base::ContainsKey(profile_to_user_, profile_path.value())); |
| 136 const std::string& userhash = profile_to_user_[profile_path.value()]; | 136 const std::string& userhash = profile_to_user_[profile_path.value()]; |
| 137 result->SetStringWithoutPathExpansion(shill::kUserHashProperty, userhash); | 137 result->SetStringWithoutPathExpansion(shill::kUserHashProperty, userhash); |
| 138 | 138 |
| 139 base::ThreadTaskRunnerHandle::Get()->PostTask( | 139 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 140 FROM_HERE, base::Bind(base::Bind(&DereferenceAndCall, callback), | 140 FROM_HERE, base::Bind(base::Bind(&DereferenceAndCall, callback), |
| 141 base::Owned(result.release()))); | 141 base::Owned(result.release()))); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void GetEntry(const dbus::ObjectPath& profile_path, | 144 void GetEntry(const dbus::ObjectPath& profile_path, |
| 145 const std::string& entry_path, | 145 const std::string& entry_path, |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 EXPECT_CALL(*mock_profile_client_, | 977 EXPECT_CALL(*mock_profile_client_, |
| 978 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); | 978 GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _)); |
| 979 | 979 |
| 980 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); | 980 SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1, "policy/policy_wifi1.onc"); |
| 981 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); | 981 managed_network_configuration_handler_->RemoveObserver(&policy_observer_); |
| 982 managed_network_configuration_handler_.reset(); | 982 managed_network_configuration_handler_.reset(); |
| 983 message_loop_.RunUntilIdle(); | 983 message_loop_.RunUntilIdle(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 } // namespace chromeos | 986 } // namespace chromeos |
| OLD | NEW |