mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
[util/net] add error message to scheme check
* instead of just 'Check failed: scheme == "http"', we will have something like 'Check failed: scheme == "http". Got 'https' for scheme in 'https://for.bar'' * clangfmt on file Bug: fuchsia:DX-514 Change-Id: I043af7281d7f99ed5641c87920d806e340a38dea Tested=`out/Debug/crashpad_util_test` and Fuchsia logs Reviewed-on: https://chromium-review.googlesource.com/c/1262140 Commit-Queue: Francois Rousseau <frousseau@google.com> Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
21edfd3c3a
commit
ce122b644c
@ -57,8 +57,7 @@ struct ScopedAddrinfoTraits {
|
||||
static addrinfo* InvalidValue() { return nullptr; }
|
||||
static void Free(addrinfo* ai) { freeaddrinfo(ai); }
|
||||
};
|
||||
using ScopedAddrinfo =
|
||||
base::ScopedGeneric<addrinfo*, ScopedAddrinfoTraits>;
|
||||
using ScopedAddrinfo = base::ScopedGeneric<addrinfo*, ScopedAddrinfoTraits>;
|
||||
|
||||
class Stream {
|
||||
public:
|
||||
@ -81,7 +80,7 @@ class FdStream : public Stream {
|
||||
return LoggingReadFileExactly(fd_, data, size);
|
||||
}
|
||||
|
||||
bool LoggingReadToEOF(std::string* result) override{
|
||||
bool LoggingReadToEOF(std::string* result) override {
|
||||
return crashpad::LoggingReadToEOF(fd_, result);
|
||||
}
|
||||
|
||||
@ -545,7 +544,8 @@ bool HTTPTransportSocket::ExecuteSynchronously(std::string* response_body) {
|
||||
}
|
||||
|
||||
#if !defined(CRASHPAD_USE_BORINGSSL)
|
||||
CHECK(scheme == "http");
|
||||
CHECK(scheme == "http") << "Got " << scheme << " for scheme in '" << url()
|
||||
<< "'";
|
||||
#endif
|
||||
|
||||
base::ScopedFD sock(CreateSocket(hostname, port));
|
||||
|
Loading…
x
Reference in New Issue
Block a user