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

Side by Side Diff: dbus/bus.cc

Issue 2030653002: Migrate WaitableEvent to enum-based constructor in dbus/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Created 4 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 | « no previous file | dbus/test_service.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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 connection_type(PRIVATE) { 182 connection_type(PRIVATE) {
183 } 183 }
184 184
185 Bus::Options::~Options() { 185 Bus::Options::~Options() {
186 } 186 }
187 187
188 Bus::Bus(const Options& options) 188 Bus::Bus(const Options& options)
189 : bus_type_(options.bus_type), 189 : bus_type_(options.bus_type),
190 connection_type_(options.connection_type), 190 connection_type_(options.connection_type),
191 dbus_task_runner_(options.dbus_task_runner), 191 dbus_task_runner_(options.dbus_task_runner),
192 on_shutdown_(false /* manual_reset */, false /* initially_signaled */), 192 on_shutdown_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
193 base::WaitableEvent::InitialState::NOT_SIGNALED),
193 connection_(NULL), 194 connection_(NULL),
194 origin_thread_id_(base::PlatformThread::CurrentId()), 195 origin_thread_id_(base::PlatformThread::CurrentId()),
195 async_operations_set_up_(false), 196 async_operations_set_up_(false),
196 shutdown_completed_(false), 197 shutdown_completed_(false),
197 num_pending_watches_(0), 198 num_pending_watches_(0),
198 num_pending_timeouts_(0), 199 num_pending_timeouts_(0),
199 address_(options.address) { 200 address_(options.address) {
200 // This is safe to call multiple times. 201 // This is safe to call multiple times.
201 dbus_threads_init_default(); 202 dbus_threads_init_default();
202 // The origin message loop is unnecessary if the client uses synchronous 203 // The origin message loop is unnecessary if the client uses synchronous
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 kNameOwnerChangedSignal)) { 1215 kNameOwnerChangedSignal)) {
1215 Bus* self = static_cast<Bus*>(data); 1216 Bus* self = static_cast<Bus*>(data);
1216 self->OnServiceOwnerChanged(message); 1217 self->OnServiceOwnerChanged(message);
1217 } 1218 }
1218 // Always return unhandled to let others, e.g. ObjectProxies, handle the same 1219 // Always return unhandled to let others, e.g. ObjectProxies, handle the same
1219 // signal. 1220 // signal.
1220 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; 1221 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
1221 } 1222 }
1222 1223
1223 } // namespace dbus 1224 } // namespace dbus
OLDNEW
« no previous file with comments | « no previous file | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698