OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_BINDER_TEST_SERVICE_H_ | |
6 #define CHROMEOS_BINDER_TEST_SERVICE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/strings/string16.h" | |
10 #include "chromeos/binder/constants.h" | |
11 #include "chromeos/binder/thread.h" | |
12 | |
13 namespace binder { | |
14 | |
15 // Service for testing. | |
16 // Opens binder driver on its own thread and provides a service. | |
satorux1
2016/01/13 04:33:20
Maybe document that the service runs in the same p
hashimoto
2016/01/13 05:46:46
I'm not sure if there is any test running in a dif
satorux1
2016/01/14 05:47:16
Then how about documenting that the service runs i
hashimoto
2016/01/14 06:24:29
Added a note.
| |
17 class TestService { | |
18 public: | |
19 enum { | |
20 INCREMENT_INT_TRANSACTION = kFirstTransactionCode, | |
21 }; | |
22 | |
23 TestService(); | |
24 ~TestService(); | |
25 | |
26 // The name of this service. | |
27 const base::string16& service_name() const { return service_name_; } | |
28 | |
29 // Starts and waits for the service to start. | |
satorux1
2016/01/13 04:33:20
please document the return value.
hashimoto
2016/01/13 05:46:46
Done.
| |
30 bool StartAndWait(); | |
31 | |
32 // Stops this service. | |
33 void Stop(); | |
34 | |
35 private: | |
36 class TestObject; | |
37 | |
38 void Initialize(bool* result); | |
satorux1
2016/01/13 04:33:20
function comment is missing.
hashimoto
2016/01/13 05:46:46
Done.
| |
39 | |
40 base::string16 service_name_; | |
41 Thread thread_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(TestService); | |
44 }; | |
45 | |
46 } // namespace binder | |
47 | |
48 #endif // CHROMEOS_BINDER_TEST_SERVICE_H_ | |
OLD | NEW |