Use multimap type for storing header values (issue #386).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@346 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-10-28 21:31:26 +00:00
parent 0ec9541b78
commit ef80d4ae6b
17 changed files with 419 additions and 45 deletions

View File

@ -99,7 +99,7 @@ void CEF_CALLBACK request_set_post_data(struct _cef_request_t* self,
}
void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
cef_string_multimap_t headerMap)
{
DCHECK(self);
if(!self)
@ -107,11 +107,11 @@ void CEF_CALLBACK request_get_header_map(struct _cef_request_t* self,
CefRequest::HeaderMap map;
CefRequestCppToC::Get(self)->GetHeaderMap(map);
transfer_string_map_contents(map, headerMap);
transfer_string_multimap_contents(map, headerMap);
}
void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
cef_string_map_t headerMap)
cef_string_multimap_t headerMap)
{
DCHECK(self);
if(!self)
@ -119,14 +119,14 @@ void CEF_CALLBACK request_set_header_map(struct _cef_request_t* self,
CefRequest::HeaderMap map;
if(headerMap)
transfer_string_map_contents(headerMap, map);
transfer_string_multimap_contents(headerMap, map);
CefRequestCppToC::Get(self)->SetHeaderMap(map);
}
void CEF_CALLBACK request_set(struct _cef_request_t* self,
const cef_string_t* url, const cef_string_t* method,
struct _cef_post_data_t* postData, cef_string_map_t headerMap)
struct _cef_post_data_t* postData, cef_string_multimap_t headerMap)
{
DCHECK(self);
if(!self)
@ -138,7 +138,7 @@ void CEF_CALLBACK request_set(struct _cef_request_t* self,
if(postData)
postDataPtr = CefPostDataCppToC::Unwrap(postData);
if(headerMap)
transfer_string_map_contents(headerMap, map);
transfer_string_multimap_contents(headerMap, map);
CefRequestCppToC::Get(self)->Set(CefString(url), CefString(method),
postDataPtr, map);