request_handler_for_device_attribute_update_permission.h 1.4 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_ATTRIBUTE_UPDATE_PERMISSION_H_
  5. #define COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_DEVICE_ATTRIBUTE_UPDATE_PERMISSION_H_
  6. #include "components/policy/test_support/embedded_policy_test_server.h"
  7. namespace policy {
  8. // Handler for request type `device_attribute_update_permission`.
  9. class RequestHandlerForDeviceAttributeUpdatePermission
  10. : public EmbeddedPolicyTestServer::RequestHandler {
  11. public:
  12. explicit RequestHandlerForDeviceAttributeUpdatePermission(
  13. EmbeddedPolicyTestServer* parent);
  14. RequestHandlerForDeviceAttributeUpdatePermission(
  15. RequestHandlerForDeviceAttributeUpdatePermission&& handler) = delete;
  16. RequestHandlerForDeviceAttributeUpdatePermission& operator=(
  17. RequestHandlerForDeviceAttributeUpdatePermission&& handler) = delete;
  18. ~RequestHandlerForDeviceAttributeUpdatePermission() 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_ATTRIBUTE_UPDATE_PERMISSION_H_