1 // Copyright 2021 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef TESTING_LIBFUZZER_PROTO_URL_PROTO_CONVERTER_H_ 6 #define TESTING_LIBFUZZER_PROTO_URL_PROTO_CONVERTER_H_ 7 8 #include "testing/libfuzzer/proto/url.pb.h" 9 10 namespace url_proto { 11 12 // Converts a URL in Protocol Buffer format to a url in string format. 13 // Since protobuf is a relatively simple format, fuzzing targets that do not 14 // accept protobufs (such as this one) will require code to convert from 15 // protobuf to the accepted format (string in this case). 16 std::string Convert(const url_proto::Url& url); 17 18 } // namespace url_proto 19 20 #endif // TESTING_LIBFUZZER_PROTO_URL_PROTO_CONVERTER_H_ 21