diff options
author | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-11 00:24:09 +0000 |
---|---|---|
committer | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-11 00:24:09 +0000 |
commit | 818d715da838dfe158edee1ab40cdbf97c91ac69 (patch) | |
tree | 74bed350b7790d590c50812c00e4e1ccc8cffebc /net | |
parent | 3413dd8e6353804a0931fc86f842194a6891be90 (diff) | |
download | chromium_src-818d715da838dfe158edee1ab40cdbf97c91ac69.zip chromium_src-818d715da838dfe158edee1ab40cdbf97c91ac69.tar.gz chromium_src-818d715da838dfe158edee1ab40cdbf97c91ac69.tar.bz2 |
Remove all but one place in this file where we return
ERR_FAILED.
In the remaining place, log the original Win32 error
code to help diagnose a failure in the field.
R=darin
Review URL: http://codereview.chromium.org/2401
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_transaction_winhttp.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/http/http_transaction_winhttp.cc b/net/http/http_transaction_winhttp.cc index 7c703d0..1808cb8 100644 --- a/net/http/http_transaction_winhttp.cc +++ b/net/http/http_transaction_winhttp.cc @@ -81,6 +81,8 @@ static int TranslateOSError(DWORD error) { default: DCHECK(error != ERROR_IO_PENDING); // WinHTTP doesn't use this error. + LOG(WARNING) << "Unknown error " << error + << " mapped to net::ERR_FAILED"; return ERR_FAILED; } } @@ -1240,7 +1242,7 @@ int HttpTransactionWinHttp::SendRequest() { // TODO(darin): no way to support >4GB uploads w/ WinHttp? if (upload_len > static_cast<uint64>(DWORD(-1))) { NOTREACHED() << "upload length is too large"; - return ERR_FAILED; + return ERR_FILE_TOO_BIG; } total_size = static_cast<DWORD>(upload_len); @@ -1756,7 +1758,7 @@ void HttpTransactionWinHttp::HandleStatusCallback(DWORD status, DWORD_PTR result, DWORD error, DWORD secure_failure) { - int rv = ERR_FAILED; + int rv; switch (status) { case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: @@ -1777,6 +1779,8 @@ void HttpTransactionWinHttp::HandleStatusCallback(DWORD status, break; default: NOTREACHED() << "unexpected status code"; + rv = ERR_UNEXPECTED; + break; } if (rv == ERR_IO_PENDING) { |