Add support for GetAuthCredentials (fixes issue #2718, see issue #2622).

When NetworkService is enabled requests created using CefFrame::CreateURLRequest
will call CefRequestHandler::GetAuthCredentials for the associated browser after
calling CefURLRequestClient::GetAuthCredentials if that call returns false.
This commit is contained in:
Marshall Greenblatt
2019-07-12 16:44:43 -04:00
parent ac2cc54e13
commit 3f1ebebde5
30 changed files with 859 additions and 77 deletions

View File

@@ -126,9 +126,10 @@ class Handler : public CefMessageRouterBrowserSide::Handler {
const RequestClient::Callback& request_callback =
base::Bind(&Handler::OnRequestComplete, base::Unretained(this));
// Create and start the new CefURLRequest.
urlrequest_ = CefURLRequest::Create(
cef_request, new RequestClient(request_callback), NULL);
// Create and start a new CefURLRequest associated with the frame, so
// that it shares authentication with ClientHandler::GetAuthCredentials.
urlrequest_ = frame->CreateURLRequest(
cef_request, new RequestClient(request_callback));
return true;
}