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

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

Issue 13004024: Add ConnectToBestServices call when Certs are loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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/shill_manager_client.h ('k') | chromeos/dbus/shill_manager_client_stub.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_manager_client.h" 5 #include "chromeos/dbus/shill_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 writer.AppendString(public_key); 205 writer.AppendString(public_key);
206 writer.AppendString(nonce); 206 writer.AppendString(nonce);
207 writer.AppendString(signed_data); 207 writer.AppendString(signed_data);
208 writer.AppendString(device_serial); 208 writer.AppendString(device_serial);
209 writer.AppendObjectPath(dbus::ObjectPath(service_path)); 209 writer.AppendObjectPath(dbus::ObjectPath(service_path));
210 helper_.CallStringMethodWithErrorCallback(&method_call, 210 helper_.CallStringMethodWithErrorCallback(&method_call,
211 callback, 211 callback,
212 error_callback); 212 error_callback);
213 } 213 }
214 214
215 virtual void VerifyAndEncryptData(const std::string& certificate, 215 virtual void VerifyAndEncryptData(
216 const std::string& public_key, 216 const std::string& certificate,
217 const std::string& nonce, 217 const std::string& public_key,
218 const std::string& signed_data, 218 const std::string& nonce,
219 const std::string& device_serial, 219 const std::string& signed_data,
220 const std::string& data, 220 const std::string& device_serial,
221 const StringCallback& callback, 221 const std::string& data,
222 const ErrorCallback& error_callback) OVERRIDE { 222 const StringCallback& callback,
223 const ErrorCallback& error_callback) OVERRIDE {
223 dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface, 224 dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
224 shill::kVerifyAndEncryptDataFunction); 225 shill::kVerifyAndEncryptDataFunction);
225 dbus::MessageWriter writer(&method_call); 226 dbus::MessageWriter writer(&method_call);
226 writer.AppendString(certificate); 227 writer.AppendString(certificate);
227 writer.AppendString(public_key); 228 writer.AppendString(public_key);
228 writer.AppendString(nonce); 229 writer.AppendString(nonce);
229 writer.AppendString(signed_data); 230 writer.AppendString(signed_data);
230 writer.AppendString(device_serial); 231 writer.AppendString(device_serial);
231 writer.AppendString(data); 232 writer.AppendString(data);
232 helper_.CallStringMethodWithErrorCallback(&method_call, 233 helper_.CallStringMethodWithErrorCallback(&method_call,
233 callback, 234 callback,
234 error_callback); 235 error_callback);
235 } 236 }
236 237
238 virtual void ConnectToBestServices(
239 const base::Closure& callback,
240 const ErrorCallback& error_callback) OVERRIDE {
241 dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface,
242 shill::kConnectToBestServicesFunction);
243 helper_.CallVoidMethodWithErrorCallback(&method_call,
244 callback,
245 error_callback);
246 }
247
237 virtual TestInterface* GetTestInterface() OVERRIDE { 248 virtual TestInterface* GetTestInterface() OVERRIDE {
238 return NULL; 249 return NULL;
239 } 250 }
240 251
241 private: 252 private:
242 dbus::ObjectProxy* proxy_; 253 dbus::ObjectProxy* proxy_;
243 ShillClientHelper helper_; 254 ShillClientHelper helper_;
244 255
245 DISALLOW_COPY_AND_ASSIGN(ShillManagerClientImpl); 256 DISALLOW_COPY_AND_ASSIGN(ShillManagerClientImpl);
246 }; 257 };
247 258
248 } // namespace 259 } // namespace
249 260
250 ShillManagerClient::ShillManagerClient() {} 261 ShillManagerClient::ShillManagerClient() {}
251 262
252 ShillManagerClient::~ShillManagerClient() {} 263 ShillManagerClient::~ShillManagerClient() {}
253 264
254 // static 265 // static
255 ShillManagerClient* ShillManagerClient::Create( 266 ShillManagerClient* ShillManagerClient::Create(
256 DBusClientImplementationType type, 267 DBusClientImplementationType type,
257 dbus::Bus* bus) { 268 dbus::Bus* bus) {
258 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 269 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
259 return new ShillManagerClientImpl(bus); 270 return new ShillManagerClientImpl(bus);
260 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 271 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
261 return new ShillManagerClientStub(); 272 return new ShillManagerClientStub();
262 } 273 }
263 274
264 } // namespace chromeos 275 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client.h ('k') | chromeos/dbus/shill_manager_client_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698