diff options
author | Kristian Monsen <kristianm@google.com> | 2010-08-11 10:22:40 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-08-11 11:21:25 +0100 |
commit | 21baf41667f5ac764512f0168a702390daf45bf3 (patch) | |
tree | 68bf2e1e67aacde6c5a61e905d8803c09c039795 /WebKit/android/WebCoreSupport/WebResponse.cpp | |
parent | b69fcd13ce2c9cf0b62243d9eaffd47f77e801c0 (diff) | |
download | external_webkit-21baf41667f5ac764512f0168a702390daf45bf3.zip external_webkit-21baf41667f5ac764512f0168a702390daf45bf3.tar.gz external_webkit-21baf41667f5ac764512f0168a702390daf45bf3.tar.bz2 |
Send didFail to webcore for failed requests.
Also removed the member variable m_resourceRequest as it is not needed outside the function.
Change-Id: I5a627306de8a8d8c59044046003e8515fd10f5c8
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebResponse.cpp')
-rw-r--r-- | WebKit/android/WebCoreSupport/WebResponse.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/WebResponse.cpp b/WebKit/android/WebCoreSupport/WebResponse.cpp index 6fc48e9..fcd2127 100644 --- a/WebKit/android/WebCoreSupport/WebResponse.cpp +++ b/WebKit/android/WebCoreSupport/WebResponse.cpp @@ -27,6 +27,7 @@ #include "WebResponse.h" #include "ResourceResponse.h" +#include "ResourceError.h" namespace android { @@ -34,6 +35,7 @@ WebResponse::WebResponse(URLRequest* request) : m_httpStatusCode(0) { m_url = request->url().spec(); + m_host = request->url().HostNoBrackets(); request->GetMimeType(&m_mime); request->GetCharset(&m_encoding); m_length = request->GetExpectedContentSize(); @@ -74,6 +76,14 @@ WebCore::ResourceResponse WebResponse::createResourceResponse() return resourceResponse; } +WebCore::ResourceError WebResponse::createResourceError() +{ + // TODO: Last parameter is a localized string, get the correct one from android + WebCore::ResourceError error(m_host.c_str(), m_httpStatusCode, m_url.c_str(), m_httpStatusText.c_str()); + return error; +} + + WebCore::KURL WebResponse::url() { WebCore::KURL kurl(WebCore::ParsedURLString, m_url.c_str()); |