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

Side by Side Diff: chromeos/dbus/services/service_provider_test_helper.cc

Issue 2818533003: Make nesting/running states a RunLoop rather than a MessageLoop concept. (Closed)
Patch Set: still need to check MessageLoop::current() in Mojo's RunLoopNestingObserver::GetForThread() Created 3 years, 7 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
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/services/service_provider_test_helper.h" 5 #include "chromeos/dbus/services/service_provider_test_helper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void ServiceProviderTestHelper::MockSendSignal(dbus::Signal* signal) { 151 void ServiceProviderTestHelper::MockSendSignal(dbus::Signal* signal) {
152 // Run the callback captured in MockConnectToSignal(). This will call 152 // Run the callback captured in MockConnectToSignal(). This will call
153 // OnSignalReceived(). 153 // OnSignalReceived().
154 on_signal_callback_.Run(signal); 154 on_signal_callback_.Run(signal);
155 } 155 }
156 156
157 void ServiceProviderTestHelper::OnResponse( 157 void ServiceProviderTestHelper::OnResponse(
158 std::unique_ptr<dbus::Response> response) { 158 std::unique_ptr<dbus::Response> response) {
159 response_ = std::move(response); 159 response_ = std::move(response);
160 response_received_ = true; 160 response_received_ = true;
161 if (base::MessageLoop::current()->is_running()) 161 if (base::RunLoop::IsRunningOnCurrentThread())
162 base::MessageLoop::current()->QuitWhenIdle(); 162 base::MessageLoop::current()->QuitWhenIdle();
163 } 163 }
164 164
165 } // namespace chromeos 165 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | components/omnibox/browser/autocomplete_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698