Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: chromeos/dbus/fake_shill_ipconfig_client.cc

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/fake_shill_ipconfig_client.h ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_ipconfig_client.h ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698