| 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 "dbus/bus.h" | 5 #include "dbus/bus.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 } | 838 } |
| 839 | 839 |
| 840 void Bus::AssertOnOriginThread() { | 840 void Bus::AssertOnOriginThread() { |
| 841 DCHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId()); | 841 DCHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId()); |
| 842 } | 842 } |
| 843 | 843 |
| 844 void Bus::AssertOnDBusThread() { | 844 void Bus::AssertOnDBusThread() { |
| 845 base::ThreadRestrictions::AssertIOAllowed(); | 845 base::ThreadRestrictions::AssertIOAllowed(); |
| 846 | 846 |
| 847 if (dbus_task_runner_.get()) { | 847 if (dbus_task_runner_.get()) { |
| 848 DCHECK(dbus_task_runner_->RunsTasksOnCurrentThread()); | 848 DCHECK(dbus_task_runner_->RunsTasksInCurrentSequence()); |
| 849 } else { | 849 } else { |
| 850 AssertOnOriginThread(); | 850 AssertOnOriginThread(); |
| 851 } | 851 } |
| 852 } | 852 } |
| 853 | 853 |
| 854 std::string Bus::GetServiceOwnerAndBlock(const std::string& service_name, | 854 std::string Bus::GetServiceOwnerAndBlock(const std::string& service_name, |
| 855 GetServiceOwnerOption options) { | 855 GetServiceOwnerOption options) { |
| 856 AssertOnDBusThread(); | 856 AssertOnDBusThread(); |
| 857 | 857 |
| 858 MethodCall get_name_owner_call("org.freedesktop.DBus", "GetNameOwner"); | 858 MethodCall get_name_owner_call("org.freedesktop.DBus", "GetNameOwner"); |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 kNameOwnerChangedSignal)) { | 1201 kNameOwnerChangedSignal)) { |
| 1202 Bus* self = static_cast<Bus*>(data); | 1202 Bus* self = static_cast<Bus*>(data); |
| 1203 self->OnServiceOwnerChanged(message); | 1203 self->OnServiceOwnerChanged(message); |
| 1204 } | 1204 } |
| 1205 // Always return unhandled to let others, e.g. ObjectProxies, handle the same | 1205 // Always return unhandled to let others, e.g. ObjectProxies, handle the same |
| 1206 // signal. | 1206 // signal. |
| 1207 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; | 1207 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 } // namespace dbus | 1210 } // namespace dbus |
| OLD | NEW |