summaryrefslogtreecommitdiffstats
path: root/chromium/components/policy/test_support/request_handler_for_status_upload.h
blob: f48f539c6768e8ef49b83e4bd2f07f77475b4fcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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_STATUS_UPLOAD_H_
#define COMPONENTS_POLICY_TEST_SUPPORT_REQUEST_HANDLER_FOR_STATUS_UPLOAD_H_

#include "components/policy/test_support/embedded_policy_test_server.h"

namespace policy {

// Handler for request type `status_upload`.
class RequestHandlerForStatusUpload
    : public EmbeddedPolicyTestServer::RequestHandler {
 public:
  RequestHandlerForStatusUpload(ClientStorage* client_storage,
                                PolicyStorage* policy_storage);
  RequestHandlerForStatusUpload(RequestHandlerForStatusUpload&& handler) =
      delete;
  RequestHandlerForStatusUpload& operator=(
      RequestHandlerForStatusUpload&& handler) = delete;
  ~RequestHandlerForStatusUpload() 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_STATUS_UPLOAD_H_