request_handler_for_device_state_retrieval.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_DEVICE_STATE_RETRIEVAL_H_
  5. #define COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_DEVICE_STATE_RETRIEVAL_H_
  6. #include "components/policy/test_support/embedded_policy_test_server.h"
  7. namespace policy {
  8. // Handler for request type `device_state_retrieval`.
  9. class RequestHandlerForDeviceStateRetrieval
  10. : public EmbeddedPolicyTestServer::RequestHandler {
  11. public:
  12. explicit RequestHandlerForDeviceStateRetrieval(
  13. EmbeddedPolicyTestServer* parent);
  14. RequestHandlerForDeviceStateRetrieval(
  15. RequestHandlerForDeviceStateRetrieval&& handler) = delete;
  16. RequestHandlerForDeviceStateRetrieval& operator=(
  17. RequestHandlerForDeviceStateRetrieval&& handler) = delete;
  18. ~RequestHandlerForDeviceStateRetrieval() override;
  19. // EmbeddedPolicyTestServer::RequestHandler:
  20. std::string RequestType() override;
  21. std::unique_ptr<net::test_server::HttpResponse> HandleRequest(
  22. const net::test_server::HttpRequest& request) override;
  23. };
  24. } // namespace policy
  25. #endif // COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_DEVICE_STATE_RETRIEVAL_H_