| 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 "chromeos/dbus/services/service_provider_test_helper.h" | 5 #include "chromeos/dbus/services/service_provider_test_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "dbus/message.h" | 8 #include "dbus/message.h" |
| 9 #include "dbus/mock_bus.h" | 9 #include "dbus/mock_bus.h" |
| 10 #include "third_party/cros_system_api/dbus/service_constants.h" | 10 #include "third_party/cros_system_api/dbus/service_constants.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // Run the callback captured in MockConnectToSignal(). This will call | 151 // Run the callback captured in MockConnectToSignal(). This will call |
| 152 // OnSignalReceived(). | 152 // OnSignalReceived(). |
| 153 on_signal_callback_.Run(signal); | 153 on_signal_callback_.Run(signal); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void ServiceProviderTestHelper::OnResponse( | 156 void ServiceProviderTestHelper::OnResponse( |
| 157 scoped_ptr<dbus::Response> response) { | 157 scoped_ptr<dbus::Response> response) { |
| 158 response_ = response.Pass(); | 158 response_ = response.Pass(); |
| 159 response_received_ = true; | 159 response_received_ = true; |
| 160 if (base::MessageLoop::current()->is_running()) | 160 if (base::MessageLoop::current()->is_running()) |
| 161 base::MessageLoop::current()->Quit(); | 161 base::MessageLoop::current()->QuitWhenIdle(); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace chromeos | 164 } // namespace chromeos |
| OLD | NEW |