protocol_parser_json.h 950 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2018 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_UPDATE_CLIENT_PROTOCOL_PARSER_JSON_H_
  5. #define COMPONENTS_UPDATE_CLIENT_PROTOCOL_PARSER_JSON_H_
  6. #include <string>
  7. #include "components/update_client/protocol_parser.h"
  8. namespace update_client {
  9. // Parses responses for the update protocol version 3.
  10. // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md)
  11. class ProtocolParserJSON final : public ProtocolParser {
  12. public:
  13. ProtocolParserJSON() = default;
  14. ProtocolParserJSON(const ProtocolParserJSON&) = delete;
  15. ProtocolParserJSON& operator=(const ProtocolParserJSON&) = delete;
  16. private:
  17. // Overrides for ProtocolParser.
  18. bool DoParse(const std::string& response_json, Results* results) override;
  19. };
  20. } // namespace update_client
  21. #endif // COMPONENTS_UPDATE_CLIENT_PROTOCOL_PARSER_JSON_H_