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

Side by Side Diff: dbus/bus.cc

Issue 1179163002: Migrate callers of message_loop_proxy() to task_runner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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 | « components/html_viewer/setup.cc ('k') | dbus/bus_unittest.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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 async_operations_set_up_(false), 194 async_operations_set_up_(false),
195 shutdown_completed_(false), 195 shutdown_completed_(false),
196 num_pending_watches_(0), 196 num_pending_watches_(0),
197 num_pending_timeouts_(0), 197 num_pending_timeouts_(0),
198 address_(options.address) { 198 address_(options.address) {
199 // This is safe to call multiple times. 199 // This is safe to call multiple times.
200 dbus_threads_init_default(); 200 dbus_threads_init_default();
201 // The origin message loop is unnecessary if the client uses synchronous 201 // The origin message loop is unnecessary if the client uses synchronous
202 // functions only. 202 // functions only.
203 if (base::MessageLoop::current()) 203 if (base::MessageLoop::current())
204 origin_task_runner_ = base::MessageLoop::current()->message_loop_proxy(); 204 origin_task_runner_ = base::MessageLoop::current()->task_runner();
205 } 205 }
206 206
207 Bus::~Bus() { 207 Bus::~Bus() {
208 DCHECK(!connection_); 208 DCHECK(!connection_);
209 DCHECK(owned_service_names_.empty()); 209 DCHECK(owned_service_names_.empty());
210 DCHECK(match_rules_added_.empty()); 210 DCHECK(match_rules_added_.empty());
211 DCHECK(filter_functions_added_.empty()); 211 DCHECK(filter_functions_added_.empty());
212 DCHECK(registered_object_paths_.empty()); 212 DCHECK(registered_object_paths_.empty());
213 DCHECK_EQ(0, num_pending_watches_); 213 DCHECK_EQ(0, num_pending_watches_);
214 // TODO(satorux): This check fails occasionally in browser_tests for tests 214 // TODO(satorux): This check fails occasionally in browser_tests for tests
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 kNameOwnerChangedSignal)) { 1206 kNameOwnerChangedSignal)) {
1207 Bus* self = static_cast<Bus*>(data); 1207 Bus* self = static_cast<Bus*>(data);
1208 self->OnServiceOwnerChanged(message); 1208 self->OnServiceOwnerChanged(message);
1209 } 1209 }
1210 // Always return unhandled to let others, e.g. ObjectProxies, handle the same 1210 // Always return unhandled to let others, e.g. ObjectProxies, handle the same
1211 // signal. 1211 // signal.
1212 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; 1212 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
1213 } 1213 }
1214 1214
1215 } // namespace dbus 1215 } // namespace dbus
OLDNEW
« no previous file with comments | « components/html_viewer/setup.cc ('k') | dbus/bus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698