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

Side by Side Diff: dbus/test_service.h

Issue 802213003: Standardize usage of virtual/override/final specifiers in dbus/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/signal_sender_verification_unittest.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 #ifndef DBUS_TEST_SERVICE_H_ 5 #ifndef DBUS_TEST_SERVICE_H_
6 #define DBUS_TEST_SERVICE_H_ 6 #define DBUS_TEST_SERVICE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 28 matching lines...) Expand all
39 scoped_refptr<base::SequencedTaskRunner> dbus_task_runner; 39 scoped_refptr<base::SequencedTaskRunner> dbus_task_runner;
40 40
41 // Flags governing parameters of service ownership request. 41 // Flags governing parameters of service ownership request.
42 Bus::ServiceOwnershipOptions request_ownership_options; 42 Bus::ServiceOwnershipOptions request_ownership_options;
43 }; 43 };
44 44
45 // The number of methods we'll export. 45 // The number of methods we'll export.
46 static const int kNumMethodsToExport; 46 static const int kNumMethodsToExport;
47 47
48 explicit TestService(const Options& options); 48 explicit TestService(const Options& options);
49 virtual ~TestService(); 49 ~TestService() override;
50 50
51 // Starts the service in a separate thread. 51 // Starts the service in a separate thread.
52 // Returns true if the thread is started successfully. 52 // Returns true if the thread is started successfully.
53 bool StartService(); 53 bool StartService();
54 54
55 // Waits until the service is started (i.e. all methods are exported). 55 // Waits until the service is started (i.e. all methods are exported).
56 // Returns true on success. 56 // Returns true on success.
57 bool WaitUntilServiceIsStarted() WARN_UNUSED_RESULT; 57 bool WaitUntilServiceIsStarted() WARN_UNUSED_RESULT;
58 58
59 // Shuts down the service and blocks until it's done. 59 // Shuts down the service and blocks until it's done.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void OnOwnership(base::Callback<void(bool)> callback, 99 void OnOwnership(base::Callback<void(bool)> callback,
100 const std::string& service_name, 100 const std::string& service_name,
101 bool success); 101 bool success);
102 102
103 // Called when a method is exported. 103 // Called when a method is exported.
104 void OnExported(const std::string& interface_name, 104 void OnExported(const std::string& interface_name,
105 const std::string& method_name, 105 const std::string& method_name,
106 bool success); 106 bool success);
107 107
108 // base::Thread override. 108 // base::Thread override.
109 virtual void Run(base::MessageLoop* message_loop) override; 109 void Run(base::MessageLoop* message_loop) override;
110 110
111 // 111 //
112 // Exported methods. 112 // Exported methods.
113 // 113 //
114 114
115 // Echos the text message received from the method call. 115 // Echos the text message received from the method call.
116 void Echo(MethodCall* method_call, 116 void Echo(MethodCall* method_call,
117 dbus::ExportedObject::ResponseSender response_sender); 117 dbus::ExportedObject::ResponseSender response_sender);
118 118
119 // Echos the text message received from the method call, but sleeps for 119 // Echos the text message received from the method call, but sleeps for
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool has_ownership_; 209 bool has_ownership_;
210 210
211 scoped_refptr<Bus> bus_; 211 scoped_refptr<Bus> bus_;
212 ExportedObject* exported_object_; 212 ExportedObject* exported_object_;
213 ExportedObject* exported_object_manager_; 213 ExportedObject* exported_object_manager_;
214 }; 214 };
215 215
216 } // namespace dbus 216 } // namespace dbus
217 217
218 #endif // DBUS_TEST_SERVICE_H_ 218 #endif // DBUS_TEST_SERVICE_H_
OLDNEW
« no previous file with comments | « dbus/signal_sender_verification_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698