OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/shill_service_client_stub.h" | 5 #include "chromeos/dbus/shill_service_client_stub.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 DBusMethodCallStatus call_status; | 89 DBusMethodCallStatus call_status; |
90 stub_services_.GetDictionaryWithoutPathExpansion(service_path.value(), | 90 stub_services_.GetDictionaryWithoutPathExpansion(service_path.value(), |
91 &nested_dict); | 91 &nested_dict); |
92 if (nested_dict) { | 92 if (nested_dict) { |
93 result_properties.reset(nested_dict->DeepCopy()); | 93 result_properties.reset(nested_dict->DeepCopy()); |
94 // Remove credentials that Shill wouldn't send. | 94 // Remove credentials that Shill wouldn't send. |
95 result_properties->RemoveWithoutPathExpansion(flimflam::kPassphraseProperty, | 95 result_properties->RemoveWithoutPathExpansion(flimflam::kPassphraseProperty, |
96 NULL); | 96 NULL); |
97 call_status = DBUS_METHOD_CALL_SUCCESS; | 97 call_status = DBUS_METHOD_CALL_SUCCESS; |
98 } else { | 98 } else { |
| 99 LOG(ERROR) << "Properties not found for: " << service_path.value(); |
99 result_properties.reset(new base::DictionaryValue); | 100 result_properties.reset(new base::DictionaryValue); |
100 call_status = DBUS_METHOD_CALL_FAILURE; | 101 call_status = DBUS_METHOD_CALL_FAILURE; |
101 } | 102 } |
102 | 103 |
103 base::MessageLoop::current()->PostTask( | 104 base::MessageLoop::current()->PostTask( |
104 FROM_HERE, | 105 FROM_HERE, |
105 base::Bind(&PassStubServiceProperties, | 106 base::Bind(&PassStubServiceProperties, |
106 callback, | 107 callback, |
107 call_status, | 108 call_status, |
108 base::Owned(result_properties.release()))); | 109 base::Owned(result_properties.release()))); |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 base::Bind(&base::DoNothing), | 655 base::Bind(&base::DoNothing), |
655 error_callback); | 656 error_callback); |
656 SetProperty(service_path, | 657 SetProperty(service_path, |
657 flimflam::kConnectableProperty, | 658 flimflam::kConnectableProperty, |
658 base::FundamentalValue(true), | 659 base::FundamentalValue(true), |
659 base::Bind(&base::DoNothing), | 660 base::Bind(&base::DoNothing), |
660 error_callback); | 661 error_callback); |
661 } | 662 } |
662 | 663 |
663 } // namespace chromeos | 664 } // namespace chromeos |
OLD | NEW |