| Index: child_job.h
|
| diff --git a/child_job.h b/child_job.h
|
| index 08432c8afb057d55fb8e7576768c056542505e39..5dd5b47a6670dce944b05fff9b584d2f34171ffe 100644
|
| --- a/child_job.h
|
| +++ b/child_job.h
|
| @@ -6,6 +6,7 @@
|
| #define LOGIN_MANAGER_CHILD_JOB_H_
|
|
|
| #include <gtest/gtest.h>
|
| +#include <time.h>
|
| #include <unistd.h>
|
|
|
| #include <base/basictypes.h>
|
| @@ -26,6 +27,12 @@ class ChildJob {
|
|
|
| virtual bool ShouldRun() = 0;
|
|
|
| + // ShouldStop() is different from !ShouldRun(). If ShouldStop() returns
|
| + // true, this means that the parent should tear everything down.
|
| + virtual bool ShouldStop() = 0;
|
| +
|
| + virtual void RecordTime() = 0;
|
| +
|
| // Wraps up all the logic of what the job is meant to do. Should NOT return.
|
| virtual void Run() = 0;
|
|
|
| @@ -50,6 +57,8 @@ class SetUidExecJob : public ChildJob {
|
| static const int kCantExec;
|
|
|
| bool ShouldRun();
|
| + bool ShouldStop();
|
| + void RecordTime();
|
| void Run();
|
| void Toggle() { include_login_flag_ = !include_login_flag_; }
|
|
|
| @@ -85,6 +94,7 @@ class SetUidExecJob : public ChildJob {
|
| uid_t desired_uid_;
|
| bool include_login_flag_; // This class' piece of toggleable state.
|
| bool set_uid_;
|
| + time_t last_start_;
|
|
|
| FRIEND_TEST(SetUidExecJobTest, FlagAppendTest);
|
| FRIEND_TEST(SetUidExecJobTest, NoFlagAppendTest);
|
|
|