7 #ifndef PACKAGER_APP_JOB_MANAGER_H_ 8 #define PACKAGER_APP_JOB_MANAGER_H_ 13 #include "packager/base/threading/simple_thread.h" 14 #include "packager/status.h" 23 class Job :
public base::SimpleThread {
25 Job(
const std::string& name, std::shared_ptr<OriginHandler> work);
34 const Status& status()
const {
return status_; }
38 base::WaitableEvent* wait() {
return &wait_; }
42 Job& operator=(
const Job&) =
delete;
46 std::shared_ptr<OriginHandler> work_;
49 base::WaitableEvent wait_;
62 void Add(
const std::string& name, std::shared_ptr<OriginHandler> handler);
84 std::shared_ptr<OriginHandler> worker;
87 std::vector<JobEntry> job_entries_;
88 std::vector<std::unique_ptr<Job>> jobs_;
94 #endif // PACKAGER_APP_JOB_MANAGER_H_ All the methods that are virtual are virtual for mocking.