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

Unified Diff: chromeos/binder/test_service.h

Issue 1575313002: Add CommandBroker::OnTransaction to handle incoming transactions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/binder/test_service.h
diff --git a/chromeos/binder/test_service.h b/chromeos/binder/test_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..c88c759a3ebc2c10d30e5861c12626dbd4347380
--- /dev/null
+++ b/chromeos/binder/test_service.h
@@ -0,0 +1,48 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_BINDER_TEST_SERVICE_H_
+#define CHROMEOS_BINDER_TEST_SERVICE_H_
+
+#include "base/macros.h"
+#include "base/strings/string16.h"
+#include "chromeos/binder/constants.h"
+#include "chromeos/binder/thread.h"
+
+namespace binder {
+
+// Service for testing.
+// 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.
+class TestService {
+ public:
+ enum {
+ INCREMENT_INT_TRANSACTION = kFirstTransactionCode,
+ };
+
+ TestService();
+ ~TestService();
+
+ // The name of this service.
+ const base::string16& service_name() const { return service_name_; }
+
+ // 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.
+ bool StartAndWait();
+
+ // Stops this service.
+ void Stop();
+
+ private:
+ class TestObject;
+
+ void Initialize(bool* result);
satorux1 2016/01/13 04:33:20 function comment is missing.
hashimoto 2016/01/13 05:46:46 Done.
+
+ base::string16 service_name_;
+ Thread thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestService);
+};
+
+} // namespace binder
+
+#endif // CHROMEOS_BINDER_TEST_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698