| Index: third_party/crashpad/crashpad/test/hex_string.h
|
| diff --git a/third_party/crashpad/crashpad/util/net/http_headers.h b/third_party/crashpad/crashpad/test/hex_string.h
|
| similarity index 50%
|
| copy from third_party/crashpad/crashpad/util/net/http_headers.h
|
| copy to third_party/crashpad/crashpad/test/hex_string.h
|
| index 3633cb2d690654d1c802edf6a2cede979eb0641e..08654880f4d7d5acc6aadc4cdd90c1cd2ffa850f 100644
|
| --- a/third_party/crashpad/crashpad/util/net/http_headers.h
|
| +++ b/third_party/crashpad/crashpad/test/hex_string.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2014 The Crashpad Authors. All rights reserved.
|
| +// Copyright 2017 The Crashpad Authors. All rights reserved.
|
| //
|
| // Licensed under the Apache License, Version 2.0 (the "License");
|
| // you may not use this file except in compliance with the License.
|
| @@ -12,23 +12,29 @@
|
| // See the License for the specific language governing permissions and
|
| // limitations under the License.
|
|
|
| -#ifndef CRASHPAD_UTIL_NET_HTTP_HEADERS_H_
|
| -#define CRASHPAD_UTIL_NET_HTTP_HEADERS_H_
|
| +#ifndef CRASHPAD_TEST_HEX_STRING_H_
|
| +#define CRASHPAD_TEST_HEX_STRING_H_
|
| +
|
| +#include <sys/types.h>
|
|
|
| -#include <map>
|
| #include <string>
|
|
|
| namespace crashpad {
|
| -
|
| -//! \brief A map of HTTP header fields to their values.
|
| -using HTTPHeaders = std::map<std::string, std::string>;
|
| -
|
| -//! \brief The header name `"Content-Type"`.
|
| -extern const char kContentType[];
|
| -
|
| -//! \brief The header name `"Content-Length"`.
|
| -extern const char kContentLength[];
|
| -
|
| +namespace test {
|
| +
|
| +//! \brief Returns a hexadecimal string corresponding to \a bytes and \a length.
|
| +//!
|
| +//! Example usage:
|
| +//! \code
|
| +//! uint8_t expected[10];
|
| +//! uint8_t observed[10];
|
| +//! // …
|
| +//! EXPECT_EQ(BytesToHexString(expected, arraysize(expected)),
|
| +//! BytesToHexString(observed, arraysize(observed)));
|
| +//! \endcode
|
| +std::string BytesToHexString(const void* bytes, size_t length);
|
| +
|
| +} // namespace test
|
| } // namespace crashpad
|
|
|
| -#endif // CRASHPAD_UTIL_NET_HTTP_HEADERS_H_
|
| +#endif // CRASHPAD_TEST_HEX_STRING_H_
|
|
|