- Add CefPostData::HasExcludedElements which returns true if the underlying

POST data includes elements that are not represented (issue #1761).
- Add CefRequest::SetReferrer and CefRequest::GetReferrer[URL|Policy]. The
  Referer value will no longer be stored in the header map.
- Move request-related conversion logic to CefRequestImpl and standardize the
  implementation.
This commit is contained in:
Marshall Greenblatt
2015-12-01 13:22:28 -05:00
parent 2ddbe64750
commit e7a02fe00f
18 changed files with 793 additions and 347 deletions

View File

@@ -1713,26 +1713,10 @@ void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
void CefBrowserHostImpl::LoadRequest(int64 frame_id,
CefRefPtr<CefRequest> request) {
CefNavigateParams params(GURL(std::string(request->GetURL())),
ui::PAGE_TRANSITION_TYPED);
params.method = request->GetMethod();
CefNavigateParams params(GURL(), ui::PAGE_TRANSITION_TYPED);
params.frame_id = frame_id;
params.first_party_for_cookies =
GURL(std::string(request->GetFirstPartyForCookies()));
CefRequest::HeaderMap headerMap;
request->GetHeaderMap(headerMap);
if (!headerMap.empty())
params.headers = HttpHeaderUtils::GenerateHeaders(headerMap);
CefRefPtr<CefPostData> postData = request->GetPostData();
if (postData.get()) {
CefPostDataImpl* impl = static_cast<CefPostDataImpl*>(postData.get());
params.upload_data = new net::UploadData();
impl->Get(*params.upload_data.get());
}
params.load_flags = request->GetFlags();
static_cast<CefRequestImpl*>(request.get())->Get(params);
Navigate(params);
}