summaryrefslogtreecommitdiffstats
path: root/webkit/glue/weburlrequest_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 01:13:32 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-25 01:13:32 +0000
commit8e3c1a7ce2fb52858b6908cdd5bd5ddf547fd386 (patch)
tree1e8f8c007d25467f5f57e5f1f31174214dce96b4 /webkit/glue/weburlrequest_impl.cc
parentf86a07024080cd1b000105bce34ce45b2bd5159b (diff)
downloadchromium_src-8e3c1a7ce2fb52858b6908cdd5bd5ddf547fd386.zip
chromium_src-8e3c1a7ce2fb52858b6908cdd5bd5ddf547fd386.tar.gz
chromium_src-8e3c1a7ce2fb52858b6908cdd5bd5ddf547fd386.tar.bz2
Fixes the WebRequest API to consistently use std::string instead of
std::wstring for HTTP header fields The HTTP specification guarantees that all fields in the header will be ASCII and thus fit fine in a std::string. The GetHttpHeaders/SetHttpHeaders interfaces use std::string values for HTTP headers. This patch fixes GetHttpMethod(), SetHttpMethod(), GetHttpHeaderValue() and SetHttpHeaderValue() and callers to use std::string as well. Patch by James Robinson <jamesr@google.com> R=darin Review URL: http://codereview.chromium.org/12412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/weburlrequest_impl.cc')
-rw-r--r--webkit/glue/weburlrequest_impl.cc22
1 files changed, 11 insertions, 11 deletions
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 {