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

Side by Side Diff: dbus/bus.cc

Issue 2886913005: Rename TaskRunner::RunsTasksOnCurrentThread() in //dbus, //chromeos, //ppapi (Closed)
Patch Set: 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
« no previous file with comments | « chromeos/login/auth/login_performer.cc ('k') | dbus/exported_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « chromeos/login/auth/login_performer.cc ('k') | dbus/exported_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698