Commit f79dd600 authored by yhirano's avatar yhirano Committed by Commit bot

Remove untaken branches from AsyncResourceHandler

As it's not possible to create a URLRequestStatus whose status is CANCELLED
or FAILED and whose error code is OK, the branch in AsyncResourceHandler to
sanitize such status is no longer needed.

BUG=None

Review-Url: https://codereview.chromium.org/2135133002
Cr-Commit-Position: refs/heads/master@{#404647}
parent 856c9825
...@@ -513,16 +513,6 @@ void AsyncResourceHandler::OnResponseCompleted( ...@@ -513,16 +513,6 @@ void AsyncResourceHandler::OnResponseCompleted(
// the ERR_ABORTED error code). // the ERR_ABORTED error code).
DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED); DCHECK(!was_ignored_by_handler || error_code == net::ERR_ABORTED);
// TODO(mkosiba): Fix up cases where we create a URLRequestStatus
// with a status() != SUCCESS and an error_code() == net::OK.
if (status.status() == net::URLRequestStatus::CANCELED &&
error_code == net::OK) {
error_code = net::ERR_ABORTED;
} else if (status.status() == net::URLRequestStatus::FAILED &&
error_code == net::OK) {
error_code = net::ERR_FAILED;
}
ResourceRequestCompletionStatus request_complete_data; ResourceRequestCompletionStatus request_complete_data;
request_complete_data.error_code = error_code; request_complete_data.error_code = error_code;
request_complete_data.was_ignored_by_handler = was_ignored_by_handler; request_complete_data.was_ignored_by_handler = was_ignored_by_handler;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment