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

Side by Side Diff: dbus/test_service.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 | « dbus/bus.cc ('k') | no next file » | 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/test_service.h" 5 #include "dbus/test_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 TestService::Options::~Options() { 40 TestService::Options::~Options() {
41 } 41 }
42 42
43 TestService::TestService(const Options& options) 43 TestService::TestService(const Options& options)
44 : base::Thread("TestService"), 44 : base::Thread("TestService"),
45 service_name_(options.service_name), 45 service_name_(options.service_name),
46 request_ownership_options_(options.request_ownership_options), 46 request_ownership_options_(options.request_ownership_options),
47 dbus_task_runner_(options.dbus_task_runner), 47 dbus_task_runner_(options.dbus_task_runner),
48 on_name_obtained_(false, false), 48 on_name_obtained_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
49 base::WaitableEvent::InitialState::NOT_SIGNALED),
49 num_exported_methods_(0), 50 num_exported_methods_(0),
50 send_immediate_properties_changed_(false), 51 send_immediate_properties_changed_(false),
51 has_ownership_(false), 52 has_ownership_(false),
52 exported_object_(NULL), 53 exported_object_(NULL),
53 exported_object_manager_(NULL) { 54 exported_object_manager_(NULL) {
54 if (service_name_.empty()) { 55 if (service_name_.empty()) {
55 service_name_ = "org.chromium.TestService-" + base::GenerateGUID(); 56 service_name_ = "org.chromium.TestService-" + base::GenerateGUID();
56 } 57 }
57 } 58 }
58 59
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 MessageWriter invalidated_array_writer(NULL); 743 MessageWriter invalidated_array_writer(NULL);
743 744
744 writer.OpenArray("s", &invalidated_array_writer); 745 writer.OpenArray("s", &invalidated_array_writer);
745 invalidated_array_writer.AppendString("Name"); 746 invalidated_array_writer.AppendString("Name");
746 writer.CloseContainer(&invalidated_array_writer); 747 writer.CloseContainer(&invalidated_array_writer);
747 748
748 exported_object_->SendSignal(&signal); 749 exported_object_->SendSignal(&signal);
749 } 750 }
750 751
751 } // namespace dbus 752 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/bus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698