summaryrefslogtreecommitdiffstats
path: root/chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h')
-rw-r--r--chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h b/chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h
new file mode 100644
index 00000000000..15d572cafdc
--- /dev/null
+++ b/chromium/components/policy/test_support/request_handler_for_chrome_desktop_report.h
@@ -0,0 +1,32 @@
+// Copyright 2021 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_CHROME_DESKTOP_REPORT_H_
+#define COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_CHROME_DESKTOP_REPORT_H_
+
+#include "components/policy/test_support/embedded_policy_test_server.h"
+
+namespace policy {
+
+// Handler for request type `chrome_desktop_report`.
+class RequestHandlerForChromeDesktopReport
+ : public EmbeddedPolicyTestServer::RequestHandler {
+ public:
+ RequestHandlerForChromeDesktopReport(ClientStorage* client_storage,
+ PolicyStorage* policy_storage);
+ RequestHandlerForChromeDesktopReport(
+ RequestHandlerForChromeDesktopReport&& handler) = delete;
+ RequestHandlerForChromeDesktopReport& operator=(
+ RequestHandlerForChromeDesktopReport&& handler) = delete;
+ ~RequestHandlerForChromeDesktopReport() 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_CHROME_DESKTOP_REPORT_H_