Commit 790eaaa7 authored by rdsmith's avatar rdsmith Committed by Commit bot

Handle URLRequest::Read() returning false without an error or ERR_IO_PENDING.

This is a possible cause for a failure being seen in the field in the
associated bug; this change is a quick fix for that failure + UMA to
determine if the failure is real.

BUG=416639
R=mef@chromium.org
R=asvitkine@chromium.org

Review URL: https://codereview.chromium.org/597633002

Cr-Commit-Position: refs/heads/master@{#296241}
parent 96f42fb6
......@@ -204,6 +204,14 @@ int SdchDictionaryFetcher::DoRead(int rv) {
return ERR_IO_PENDING;
DCHECK_NE(current_request_->status().error(), OK);
if (current_request_->status().error() == OK) {
// This "should never happen", but if it does the result will be
// an infinite loop. It's not clear how to handle a read failure
// without a promise to invoke the callback at some point in the future,
// so the request is failed.
SdchManager::SdchErrorRecovery(SdchManager::DICTIONARY_FETCH_READ_FAILED);
return ERR_FAILED;
}
return current_request_->status().error();
}
......
......@@ -124,6 +124,7 @@ class NET_EXPORT SdchManager
DICTIONARY_COUNT_EXCEEDED = 35,
DICTIONARY_ALREADY_SCHEDULED_TO_DOWNLOAD = 36,
DICTIONARY_ALREADY_TRIED_TO_DOWNLOAD = 37,
DICTIONARY_FETCH_READ_FAILED = 38,
// Failsafe hack.
ATTEMPT_TO_DECODE_NON_HTTP_DATA = 40,
......
......@@ -50141,6 +50141,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="35" label="DICTIONARY_COUNT_EXCEEDED"/>
<int value="36" label="DICTIONARY_ALREADY_SCHEDULED_TO_DOWNLOAD"/>
<int value="37" label="DICTIONARY_ALREADY_TRIED_TO_DOWNLOAD"/>
<int value="38" label="DICTIONARY_FETCH_READ_FAILED"/>
<int value="40" label="ATTEMPT_TO_DECODE_NON_HTTP_DATA"/>
<int value="50" label="MULTIENCODING_FOR_NON_SDCH_REQUEST"/>
<int value="51" label="SDCH_CONTENT_ENCODE_FOR_NON_SDCH_REQUEST"/>
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