mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 20:20:51 +01:00
CefRequestHandler::GetAuthCredentials |scheme| argument is optional for FTP sources (issue #1794)
This commit is contained in:
parent
ae25a352d0
commit
07e845ed31
@ -188,10 +188,13 @@ typedef struct _cef_request_handler_t {
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and |port| contains the port number. Return true (1) to continue
|
||||
// the request and call cef_auth_callback_t::cont() either in this function or
|
||||
// at a later time when the authentication information is available. Return
|
||||
// false (0) to cancel the request immediately.
|
||||
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||
// challenge and may be NULL. |scheme| is the authentication scheme used, such
|
||||
// as "basic" or "digest", and will be NULL if the source of the request is an
|
||||
// FTP server. Return true (1) to continue the request and call
|
||||
// cef_auth_callback_t::cont() either in this function or at a later time when
|
||||
// the authentication information is available. Return false (0) to cancel the
|
||||
// request immediately.
|
||||
///
|
||||
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
|
||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
|
||||
|
@ -213,12 +213,15 @@ class CefRequestHandler : public virtual CefBase {
|
||||
///
|
||||
// Called on the IO thread when the browser needs credentials from the user.
|
||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||
// hostname and |port| contains the port number. Return true to continue the
|
||||
// request and call CefAuthCallback::Continue() either in this method or
|
||||
// at a later time when the authentication information is available. Return
|
||||
// false to cancel the request immediately.
|
||||
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||
// challenge and may be empty. |scheme| is the authentication scheme used,
|
||||
// such as "basic" or "digest", and will be empty if the source of the request
|
||||
// is an FTP server. Return true to continue the request and call
|
||||
// CefAuthCallback::Continue() either in this method or at a later time when
|
||||
// the authentication information is available. Return false to cancel the
|
||||
// request immediately.
|
||||
///
|
||||
/*--cef(optional_param=realm)--*/
|
||||
/*--cef(optional_param=realm,optional_param=scheme)--*/
|
||||
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
bool isProxy,
|
||||
|
@ -332,15 +332,11 @@ int CEF_CALLBACK request_handler_get_auth_credentials(
|
||||
DCHECK(host);
|
||||
if (!host)
|
||||
return 0;
|
||||
// Verify param: scheme; type: string_byref_const
|
||||
DCHECK(scheme);
|
||||
if (!scheme)
|
||||
return 0;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback);
|
||||
if (!callback)
|
||||
return 0;
|
||||
// Unverified params: realm
|
||||
// Unverified params: realm, scheme
|
||||
|
||||
// Execute
|
||||
bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials(
|
||||
|
@ -324,15 +324,11 @@ bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||
DCHECK(!host.empty());
|
||||
if (host.empty())
|
||||
return false;
|
||||
// Verify param: scheme; type: string_byref_const
|
||||
DCHECK(!scheme.empty());
|
||||
if (scheme.empty())
|
||||
return false;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback.get());
|
||||
if (!callback.get())
|
||||
return false;
|
||||
// Unverified params: realm
|
||||
// Unverified params: realm, scheme
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->get_auth_credentials(_struct,
|
||||
|
Loading…
x
Reference in New Issue
Block a user