OLD | NEW |
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 "chrome/browser/chromeos/cros/cros_network_functions.h" | 5 #include "chrome/browser/chromeos/cros/cros_network_functions.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 DBusMethodCallStatus call_status, | 337 DBusMethodCallStatus call_status, |
338 const base::DictionaryValue& value) { | 338 const base::DictionaryValue& value) { |
339 callback.Run(path, call_status == DBUS_METHOD_CALL_SUCCESS ? &value : NULL); | 339 callback.Run(path, call_status == DBUS_METHOD_CALL_SUCCESS ? &value : NULL); |
340 } | 340 } |
341 | 341 |
342 // Used as a callback for FlimflamManagerClient::GetService | 342 // Used as a callback for FlimflamManagerClient::GetService |
343 void OnGetService(const NetworkPropertiesCallback& callback, | 343 void OnGetService(const NetworkPropertiesCallback& callback, |
344 DBusMethodCallStatus call_status, | 344 DBusMethodCallStatus call_status, |
345 const dbus::ObjectPath& service_path) { | 345 const dbus::ObjectPath& service_path) { |
346 if (call_status == DBUS_METHOD_CALL_SUCCESS) { | 346 if (call_status == DBUS_METHOD_CALL_SUCCESS) { |
| 347 VLOG(1) << "OnGetServiceService: " << service_path.value(); |
347 DBusThreadManager::Get()->GetFlimflamServiceClient()->GetProperties( | 348 DBusThreadManager::Get()->GetFlimflamServiceClient()->GetProperties( |
348 service_path, base::Bind(&RunCallbackWithDictionaryValue, | 349 service_path, base::Bind(&RunCallbackWithDictionaryValue, |
349 callback, | 350 callback, |
350 service_path.value())); | 351 service_path.value())); |
351 } | 352 } |
352 } | 353 } |
353 | 354 |
354 // Used as a callback for chromeos::ConfigureService. | 355 // Used as a callback for chromeos::ConfigureService. |
355 void OnConfigureService(void* object, | 356 void OnConfigureService(void* object, |
356 const char* service_path, | 357 const char* service_path, |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 ScopedGHashTable ghash( | 1198 ScopedGHashTable ghash( |
1198 ConvertDictionaryValueToStringValueGHashTable(properties)); | 1199 ConvertDictionaryValueToStringValueGHashTable(properties)); |
1199 chromeos::ConfigureService("", ghash.get(), OnConfigureService, NULL); | 1200 chromeos::ConfigureService("", ghash.get(), OnConfigureService, NULL); |
1200 } else { | 1201 } else { |
1201 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( | 1202 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( |
1202 properties, base::Bind(&DoNothing)); | 1203 properties, base::Bind(&DoNothing)); |
1203 } | 1204 } |
1204 } | 1205 } |
1205 | 1206 |
1206 } // namespace chromeos | 1207 } // namespace chromeos |
OLD | NEW |