| 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/dbus/fake_shill_ipconfig_client.h" | 5 #include "chromeos/dbus/fake_shill_ipconfig_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 base::MessageLoop::current()->PostTask( | 83 base::MessageLoop::current()->PostTask( |
| 84 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); | 84 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void FakeShillIPConfigClient::Remove(const dbus::ObjectPath& ipconfig_path, | 87 void FakeShillIPConfigClient::Remove(const dbus::ObjectPath& ipconfig_path, |
| 88 const VoidDBusMethodCallback& callback) { | 88 const VoidDBusMethodCallback& callback) { |
| 89 base::MessageLoop::current()->PostTask( | 89 base::MessageLoop::current()->PostTask( |
| 90 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); | 90 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 ShillIPConfigClient::TestInterface* |
| 94 FakeShillIPConfigClient::GetTestInterface() { |
| 95 return this; |
| 96 } |
| 97 |
| 98 // ShillIPConfigClient::TestInterface overrides |
| 99 |
| 100 void FakeShillIPConfigClient::AddIPConfig( |
| 101 const std::string& ip_config_path, |
| 102 const base::DictionaryValue& properties) { |
| 103 ipconfigs_.SetWithoutPathExpansion(ip_config_path, properties.DeepCopy()); |
| 104 } |
| 105 |
| 106 // Private methods |
| 107 |
| 93 void FakeShillIPConfigClient::PassProperties( | 108 void FakeShillIPConfigClient::PassProperties( |
| 94 const base::DictionaryValue* values, | 109 const base::DictionaryValue* values, |
| 95 const DictionaryValueCallback& callback) const { | 110 const DictionaryValueCallback& callback) const { |
| 96 callback.Run(DBUS_METHOD_CALL_SUCCESS, *values); | 111 callback.Run(DBUS_METHOD_CALL_SUCCESS, *values); |
| 97 } | 112 } |
| 98 | 113 |
| 99 } // namespace chromeos | 114 } // namespace chromeos |
| OLD | NEW |