| Index: webkit/glue/weburlloader_impl.cc
|
| diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
|
| index 104795dd1eed0e554ef5025249e6602c20cd0646..49a939f987965c8d4cb22c4dde6af55a6c1eb365 100644
|
| --- a/webkit/glue/weburlloader_impl.cc
|
| +++ b/webkit/glue/weburlloader_impl.cc
|
| @@ -299,6 +299,7 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>,
|
| int encoded_data_length);
|
| virtual void OnReceivedCachedMetadata(const char* data, int len);
|
| virtual void OnCompletedRequest(const net::URLRequestStatus& status,
|
| + bool handled_externally,
|
| const std::string& security_info,
|
| const base::TimeTicks& completion_time);
|
|
|
| @@ -624,6 +625,7 @@ void WebURLLoaderImpl::Context::OnReceivedCachedMetadata(
|
|
|
| void WebURLLoaderImpl::Context::OnCompletedRequest(
|
| const net::URLRequestStatus& status,
|
| + bool handled_externally,
|
| const std::string& security_info,
|
| const base::TimeTicks& completion_time) {
|
| if (ftp_listing_delegate_.get()) {
|
| @@ -641,23 +643,16 @@ void WebURLLoaderImpl::Context::OnCompletedRequest(
|
|
|
| if (client_) {
|
| if (status.status() != net::URLRequestStatus::SUCCESS) {
|
| - int error_code;
|
| - if (status.status() == net::URLRequestStatus::HANDLED_EXTERNALLY) {
|
| - // By marking this request as aborted we insure that we don't navigate
|
| - // to an error page.
|
| - error_code = net::ERR_ABORTED;
|
| - } else {
|
| - error_code = status.error();
|
| - }
|
| WebURLError error;
|
| - if (error_code == net::ERR_ABORTED) {
|
| + if (status.error() == net::ERR_ABORTED) {
|
| error.isCancellation = true;
|
| - } else if (error_code == net::ERR_TEMPORARILY_THROTTLED) {
|
| + } else if (status.error() == net::ERR_TEMPORARILY_THROTTLED) {
|
| error.localizedDescription = WebString::fromUTF8(
|
| kThrottledErrorDescription);
|
| }
|
| - error.domain = WebString::fromUTF8(net::kErrorDomain);
|
| - error.reason = error_code;
|
| + error.domain = WebString::fromUTF8(
|
| + handled_externally ? "ext" : net::kErrorDomain);
|
| + error.reason = status.error();
|
| error.unreachableURL = request_.url();
|
| client_->didFail(loader_, error);
|
| } else {
|
| @@ -713,7 +708,8 @@ void WebURLLoaderImpl::Context::HandleDataURL() {
|
| OnReceivedData(data.data(), data.size(), 0);
|
| }
|
|
|
| - OnCompletedRequest(status, info.security_info, base::TimeTicks::Now());
|
| + OnCompletedRequest(status, false, info.security_info,
|
| + base::TimeTicks::Now());
|
| }
|
|
|
| // WebURLLoaderImpl -----------------------------------------------------------
|
| @@ -740,10 +736,10 @@ void WebURLLoaderImpl::loadSynchronously(const WebURLRequest& request,
|
| // status code or status text.
|
| const net::URLRequestStatus::Status& status =
|
| sync_load_response.status.status();
|
| - if (status != net::URLRequestStatus::SUCCESS &&
|
| - status != net::URLRequestStatus::HANDLED_EXTERNALLY) {
|
| + if (status != net::URLRequestStatus::SUCCESS) {
|
| response.setURL(final_url);
|
| - error.domain = WebString::fromUTF8(net::kErrorDomain);
|
| + error.domain = WebString::fromUTF8(
|
| + sync_load_response.handled_externally ? "ext" : net::kErrorDomain);
|
| error.reason = sync_load_response.status.error();
|
| error.unreachableURL = final_url;
|
| return;
|
|
|