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

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

Issue 11361211: chromeos: Remove unused CrosAddIPConfig/CrosRemoveIPConfig functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/shill_client_helper.h ('k') | chromeos/dbus/shill_device_client.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/shill_client_helper.h" 5 #include "chromeos/dbus/shill_client_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "dbus/message.h" 9 #include "dbus/message.h"
10 #include "dbus/object_proxy.h" 10 #include "dbus/object_proxy.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 bool ShillClientHelper::CallVoidMethodAndBlock( 144 bool ShillClientHelper::CallVoidMethodAndBlock(
145 dbus::MethodCall* method_call) { 145 dbus::MethodCall* method_call) {
146 scoped_ptr<dbus::Response> response( 146 scoped_ptr<dbus::Response> response(
147 blocking_method_caller_.CallMethodAndBlock(method_call)); 147 blocking_method_caller_.CallMethodAndBlock(method_call));
148 if (!response.get()) 148 if (!response.get())
149 return false; 149 return false;
150 return true; 150 return true;
151 } 151 }
152 152
153 dbus::ObjectPath ShillClientHelper::CallObjectPathMethodAndBlock(
154 dbus::MethodCall* method_call) {
155 scoped_ptr<dbus::Response> response(
156 blocking_method_caller_.CallMethodAndBlock(method_call));
157 if (!response.get())
158 return dbus::ObjectPath();
159
160 dbus::MessageReader reader(response.get());
161 dbus::ObjectPath result;
162 if (!reader.PopObjectPath(&result))
163 return dbus::ObjectPath();
164
165 return result;
166 }
167
168 base::DictionaryValue* ShillClientHelper::CallDictionaryValueMethodAndBlock( 153 base::DictionaryValue* ShillClientHelper::CallDictionaryValueMethodAndBlock(
169 dbus::MethodCall* method_call) { 154 dbus::MethodCall* method_call) {
170 scoped_ptr<dbus::Response> response( 155 scoped_ptr<dbus::Response> response(
171 blocking_method_caller_.CallMethodAndBlock(method_call)); 156 blocking_method_caller_.CallMethodAndBlock(method_call));
172 if (!response.get()) 157 if (!response.get())
173 return NULL; 158 return NULL;
174 159
175 dbus::MessageReader reader(response.get()); 160 dbus::MessageReader reader(response.get());
176 base::Value* value = dbus::PopDataAsValue(&reader); 161 base::Value* value = dbus::PopDataAsValue(&reader);
177 base::DictionaryValue* result = NULL; 162 base::DictionaryValue* result = NULL;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (response) { 334 if (response) {
350 // Error message may contain the error message as string. 335 // Error message may contain the error message as string.
351 dbus::MessageReader reader(response); 336 dbus::MessageReader reader(response);
352 error_name = response->GetErrorName(); 337 error_name = response->GetErrorName();
353 reader.PopString(&error_message); 338 reader.PopString(&error_message);
354 } 339 }
355 error_callback.Run(error_name, error_message); 340 error_callback.Run(error_name, error_message);
356 } 341 }
357 342
358 } // namespace chromeos 343 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_client_helper.h ('k') | chromeos/dbus/shill_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698