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

Unified Diff: chromeos/dbus/upstart_client.h

Issue 2475343002: Add UpstartClient (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « chromeos/dbus/fake_upstart_client.cc ('k') | chromeos/dbus/upstart_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/upstart_client.h
diff --git a/chromeos/dbus/upstart_client.h b/chromeos/dbus/upstart_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..46c65d76f2b118d03319e1a7c949a7a3370e3cd7
--- /dev/null
+++ b/chromeos/dbus/upstart_client.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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_DBUS_UPSTART_CLIENT_H_
+#define CHROMEOS_DBUS_UPSTART_CLIENT_H_
+
+#include "chromeos/chromeos_export.h"
+#include "chromeos/dbus/dbus_client.h"
+
+namespace chromeos {
+
+// UpstartClient is used to communicate with the com.ubuntu.Upstart
+// sevice. All methods should be called from the origin thread (UI thread) which
+// initializes the DBusThreadManager instance.
+class CHROMEOS_EXPORT UpstartClient : public DBusClient {
+ public:
+ ~UpstartClient() override;
+
+ // Factory function, creates a new instance and returns ownership.
+ // For normal usage, access the singleton via DBusThreadManager::Get().
+ static UpstartClient* Create();
+
+ // Starts authpolicyd.
+ virtual void StartAuthPolicyService() = 0;
+
+ protected:
+ // Create() should be used instead.
+ UpstartClient();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UpstartClient);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_UPSTART_CLIENT_H_
« no previous file with comments | « chromeos/dbus/fake_upstart_client.cc ('k') | chromeos/dbus/upstart_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698