summaryrefslogtreecommitdiffstats
path: root/chromium/components/policy/test_support/request_handler_for_unregister.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/policy/test_support/request_handler_for_unregister.h')
-rw-r--r--chromium/components/policy/test_support/request_handler_for_unregister.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/chromium/components/policy/test_support/request_handler_for_unregister.h b/chromium/components/policy/test_support/request_handler_for_unregister.h
new file mode 100644
index 00000000000..19aedfb2c85
--- /dev/null
+++ b/chromium/components/policy/test_support/request_handler_for_unregister.h
@@ -0,0 +1,31 @@
+// Copyright 2022 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_UNREGISTER_H_
+#define COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_UNREGISTER_H_
+
+#include "components/policy/test_support/embedded_policy_test_server.h"
+
+namespace policy {
+
+// Handler for request type `unregister`.
+class RequestHandlerForUnregister
+ : public EmbeddedPolicyTestServer::RequestHandler {
+ public:
+ RequestHandlerForUnregister(ClientStorage* client_storage,
+ PolicyStorage* policy_storage);
+ RequestHandlerForUnregister(RequestHandlerForUnregister&& handler) = delete;
+ RequestHandlerForUnregister& operator=(
+ RequestHandlerForUnregister&& handler) = delete;
+ ~RequestHandlerForUnregister() override;
+
+ // EmbeddedPolicyTestServer::RequestHandler:
+ std::string RequestType() override;
+ std::unique_ptr<net::test_server::HttpResponse> HandleRequest(
+ const net::test_server::HttpRequest& request) override;
+};
+
+} // namespace policy
+
+#endif // COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_UNREGISTER_H_