diff options
-rw-r--r-- | chrome/renderer/render_view.cc | 8 | ||||
-rw-r--r-- | webkit/glue/weburlrequest.h | 10 | ||||
-rw-r--r-- | webkit/glue/weburlrequest_impl.cc | 22 | ||||
-rw-r--r-- | webkit/glue/weburlrequest_impl.h | 10 | ||||
-rw-r--r-- | webkit/webkit.xcodeproj/project.pbxproj | 2 |
5 files changed, 25 insertions, 27 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4d4d4e9..835e73f 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -853,8 +853,8 @@ void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) { request->SetHistoryState(params.state); if (params.referrer.is_valid()) { - request->SetHttpHeaderValue(L"Referer", - UTF8ToWide(params.referrer.spec())); + request->SetHttpHeaderValue("Referer", + params.referrer.spec()); } main_frame->LoadRequest(request.get()); @@ -1093,8 +1093,8 @@ void RenderView::UpdateURL(WebFrame* frame) { params.referrer = GURL(initial_request.GetHttpReferrer()); } - std::wstring method = request.GetHttpMethod(); - if (method == L"POST") + std::string method = request.GetHttpMethod(); + if (method == "POST") params.is_post = true; Send(new ViewHostMsg_FrameNavigate(routing_id_, params)); diff --git a/webkit/glue/weburlrequest.h b/webkit/glue/weburlrequest.h index 5903bc2..dfead5c 100644 --- a/webkit/glue/weburlrequest.h +++ b/webkit/glue/weburlrequest.h @@ -71,16 +71,16 @@ class WebRequest { virtual void SetCachePolicy(WebRequestCachePolicy policy) = 0; // Get/set the HTTP request method. - virtual std::wstring GetHttpMethod() const = 0; - virtual void SetHttpMethod(const std::wstring& method) = 0; + virtual std::string GetHttpMethod() const = 0; + virtual void SetHttpMethod(const std::string& method) = 0; // Returns the string corresponding to a header set in the request. If the // given header was not set in the request, the empty string is returned. - virtual std::wstring GetHttpHeaderValue(const std::wstring& field) const = 0; + virtual std::string GetHttpHeaderValue(const std::string& field) const = 0; // Set a value for a header in the request. - virtual void SetHttpHeaderValue(const std::wstring& field, - const std::wstring& value) = 0; + virtual void SetHttpHeaderValue(const std::string& field, + const std::string& value) = 0; // Fills a map with all header name/value pairs set in the request. virtual void GetHttpHeaders(HeaderMap* headers) const = 0; diff --git a/webkit/glue/weburlrequest_impl.cc b/webkit/glue/weburlrequest_impl.cc index 8dc1f17..0becd94 100644 --- a/webkit/glue/weburlrequest_impl.cc +++ b/webkit/glue/weburlrequest_impl.cc @@ -79,27 +79,27 @@ void WebRequestImpl::SetCachePolicy(WebRequestCachePolicy policy) { static_cast<WebCore::ResourceRequestCachePolicy>(policy)); } -std::wstring WebRequestImpl::GetHttpMethod() const { - return webkit_glue::StringToStdWString( +std::string WebRequestImpl::GetHttpMethod() const { + return webkit_glue::StringToStdString( request_.resourceRequest().httpMethod()); } -void WebRequestImpl::SetHttpMethod(const std::wstring& method) { +void WebRequestImpl::SetHttpMethod(const std::string& method) { request_.resourceRequest().setHTTPMethod( - webkit_glue::StdWStringToString(method)); + webkit_glue::StdStringToString(method)); } -std::wstring WebRequestImpl::GetHttpHeaderValue(const std::wstring& field) const { - return webkit_glue::StringToStdWString( +std::string WebRequestImpl::GetHttpHeaderValue(const std::string& field) const { + return webkit_glue::StringToStdString( request_.resourceRequest().httpHeaderField( - webkit_glue::StdWStringToString(field))); + webkit_glue::StdStringToString(field))); } -void WebRequestImpl::SetHttpHeaderValue(const std::wstring& field, - const std::wstring& value) { +void WebRequestImpl::SetHttpHeaderValue(const std::string& field, + const std::string& value) { request_.resourceRequest().setHTTPHeaderField( - webkit_glue::StdWStringToString(field), - webkit_glue::StdWStringToString(value)); + webkit_glue::StdStringToString(field), + webkit_glue::StdStringToString(value)); } void WebRequestImpl::GetHttpHeaders(HeaderMap* headers) const { diff --git a/webkit/glue/weburlrequest_impl.h b/webkit/glue/weburlrequest_impl.h index c7fd5ef..68cb470 100644 --- a/webkit/glue/weburlrequest_impl.h +++ b/webkit/glue/weburlrequest_impl.h @@ -32,11 +32,11 @@ class WebRequestImpl : public WebRequest { virtual GURL GetMainDocumentURL() const; virtual WebRequestCachePolicy GetCachePolicy() const; virtual void SetCachePolicy(WebRequestCachePolicy policy); - virtual std::wstring GetHttpMethod() const; - virtual void SetHttpMethod(const std::wstring& method); - virtual std::wstring GetHttpHeaderValue(const std::wstring& field) const; - virtual void SetHttpHeaderValue(const std::wstring& field, - const std::wstring& value); + virtual std::string GetHttpMethod() const; + virtual void SetHttpMethod(const std::string& method); + virtual std::string GetHttpHeaderValue(const std::string& field) const; + virtual void SetHttpHeaderValue(const std::string& field, + const std::string& value); virtual void GetHttpHeaders(HeaderMap* headers) const; virtual void SetHttpHeaders(const HeaderMap& headers); virtual std::wstring GetHttpReferrer() const; diff --git a/webkit/webkit.xcodeproj/project.pbxproj b/webkit/webkit.xcodeproj/project.pbxproj index dbee003..a1a9a34 100644 --- a/webkit/webkit.xcodeproj/project.pbxproj +++ b/webkit/webkit.xcodeproj/project.pbxproj @@ -9605,7 +9605,6 @@ "$(DIR_PORT)/bridge/mac", "$(DIR_PORT)/bridge/chromium", "$(DIR_PORT)/css", - "$(DIR_PORT)/dom", "$(DIR_PORT)/history", "$(DIR_PORT)/html", "$(DIR_PORT)/ksvg2", @@ -9736,7 +9735,6 @@ "$(DIR_PORT)/bridge/mac", "$(DIR_PORT)/bridge/chromium", "$(DIR_PORT)/css", - "$(DIR_PORT)/dom", "$(DIR_PORT)/history", "$(DIR_PORT)/html", "$(DIR_PORT)/ksvg2", |