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

Unified Diff: session_manager_service.h

Issue 6239002: [login_manager] Prevent non-children from calling RestartJob (Closed) Base URL: http://git.chromium.org/git/login_manager.git@master
Patch Set: Created 9 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
« no previous file with comments | « no previous file | session_manager_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: session_manager_service.h
diff --git a/session_manager_service.h b/session_manager_service.h
index b8cfe08b4085ba7a95e19340296714105188d5b2..c4f7c404e4bd4fc0377f5af8439ea137934caa21 100644
--- a/session_manager_service.h
+++ b/session_manager_service.h
@@ -5,10 +5,10 @@
#ifndef LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_
#define LOGIN_MANAGER_SESSION_MANAGER_SERVICE_H_
-#include <gtest/gtest.h>
-
+#include <dbus/dbus.h>
#include <errno.h>
#include <glib.h>
+#include <gtest/gtest.h>
#include <signal.h>
#include <unistd.h>
@@ -28,14 +28,13 @@
#include "login_manager/system_utils.h"
#include "login_manager/upstart_signal_emitter.h"
-class CommandLine;
-
namespace login_manager {
namespace gobject {
struct SessionManager;
} // namespace gobject
class ChildJobInterface;
+class CommandLine;
class NssUtil;
// Provides a wrapper for exporting SessionManagerInterface to
@@ -131,6 +130,7 @@ class SessionManagerService : public chromeos::dbus::AbstractDbusService {
////////////////////////////////////////////////////////////////////////////
// Implementing chromeos::dbus::AbstractDbusService
virtual bool Initialize();
+ virtual bool Register(const chromeos::dbus::BusConnection &conn);
virtual bool Reset();
// Takes ownership of |file_checker|.
@@ -185,6 +185,8 @@ class SessionManagerService : public chromeos::dbus::AbstractDbusService {
// Run one of the children.
int RunChild(ChildJobInterface* child_job);
+ bool IsKnownChild(int pid);
+
// Tell us that, if we want, we can cause a graceful exit from g_main_loop.
void AllowGracefulExit();
@@ -311,6 +313,11 @@ class SessionManagerService : public chromeos::dbus::AbstractDbusService {
static void SIGTERMHandler(int signal);
// |data| is a SessionManagerService*
+ static DBusHandlerResult FilterMessage(DBusConnection* conn,
+ DBusMessage* message,
+ void* data);
+
+ // |data| is a SessionManagerService*
static void HandleChildExit(GPid pid,
gint status,
gpointer data);
« no previous file with comments | « no previous file | session_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698