[remoting host] Fix crash in ProtobufHttpStreamRequest
For authenticated requests, ProtobufHttpClient first invokes OAuthTokenGetter to get the access token, then enqueue and start the request and pass in the invalidator. But if the access token fails to fetch, ProtobufHttpClient will instead just call OnAuthFailed() without starting the request or passing in the invalidator. The previous OnAuthFailed() implementation of ProtobufHttpStreamRequest was broken, since it just called OnStreamClosed(), which assumes the invalidator_ exists and calls it. ProtobufHttpRequest OTOH seems to be intact and we have test to guard that. This CL fixes this issue on ProtobufHttpStreamRequest and add a test case for it. Bug: 1129567 Change-Id: I45d295b5a744657673568e937cf638f2013f188e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417143 Commit-Queue: Yuwei Huang <yuweih@chromium.org> Auto-Submit: Yuwei Huang <yuweih@chromium.org> Reviewed-by:Joe Downing <joedow@google.com> Cr-Commit-Position: refs/heads/master@{#808106}
Showing
Please register or sign in to comment