123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H_
- #define UPDATE_ENGINE_OMAHA_RESPONSE_HANDLER_ACTION_H_
- #include <string>
- #include <gtest/gtest_prod.h> // for FRIEND_TEST
- #include "update_engine/common/action.h"
- #include "update_engine/omaha_request_action.h"
- #include "update_engine/payload_consumer/install_plan.h"
- #include "update_engine/system_state.h"
- namespace chromeos_update_engine {
- class OmahaResponseHandlerAction;
- template <>
- class ActionTraits<OmahaResponseHandlerAction> {
- public:
- typedef OmahaResponse InputObjectType;
- typedef InstallPlan OutputObjectType;
- };
- class OmahaResponseHandlerAction : public Action<OmahaResponseHandlerAction> {
- public:
- explicit OmahaResponseHandlerAction(SystemState* system_state);
- typedef ActionTraits<OmahaResponseHandlerAction>::InputObjectType
- InputObjectType;
- typedef ActionTraits<OmahaResponseHandlerAction>::OutputObjectType
- OutputObjectType;
- void PerformAction() override;
-
-
- void TerminateProcessing() override { CHECK(false); }
- const InstallPlan& install_plan() const { return install_plan_; }
-
- static std::string StaticType() { return "OmahaResponseHandlerAction"; }
- std::string Type() const override { return StaticType(); }
- private:
-
-
- bool AreHashChecksMandatory(const OmahaResponse& response);
-
- SystemState* system_state_;
-
- InstallPlan install_plan_;
-
- std::string deadline_file_;
- friend class OmahaResponseHandlerActionTest;
- friend class OmahaResponseHandlerActionProcessorDelegate;
- FRIEND_TEST(UpdateAttempterTest, CreatePendingErrorEventResumedTest);
- FRIEND_TEST(UpdateAttempterTest, RollbackMetricsNotRollbackFailure);
- FRIEND_TEST(UpdateAttempterTest, RollbackMetricsNotRollbackSuccess);
- FRIEND_TEST(UpdateAttempterTest, RollbackMetricsRollbackFailure);
- FRIEND_TEST(UpdateAttempterTest, RollbackMetricsRollbackSuccess);
- FRIEND_TEST(UpdateAttempterTest, SetRollbackHappenedNotRollback);
- FRIEND_TEST(UpdateAttempterTest, SetRollbackHappenedRollback);
- FRIEND_TEST(UpdateAttempterTest, UpdateDeferredByPolicyTest);
- DISALLOW_COPY_AND_ASSIGN(OmahaResponseHandlerAction);
- };
- }
- #endif
|