From 9fadd1724fcd60d562d13188301fdbeca94fcd39 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 16 Dec 2011 13:50:15 +0000 Subject: [PATCH] Make the realm parameter to GetAuthCredentials() optional (issue #355). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@425 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- include/cef.h | 2 +- libcef_dll/cpptoc/request_handler_cpptoc.cc | 5 +---- libcef_dll/ctocpp/request_handler_ctocpp.cc | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/cef.h b/include/cef.h index 6e1aa3eb5..6d2d947f6 100644 --- a/include/cef.h +++ b/include/cef.h @@ -1334,7 +1334,7 @@ public: // hostname and port number. Set |username| and |password| and return // true to handle the request. Return false to cancel the request. /// - /*--cef()--*/ + /*--cef(optional_param=realm)--*/ virtual bool GetAuthCredentials(CefRefPtr browser, bool isProxy, const CefString& host, diff --git a/libcef_dll/cpptoc/request_handler_cpptoc.cc b/libcef_dll/cpptoc/request_handler_cpptoc.cc index 6386e6002..4fe94fe21 100644 --- a/libcef_dll/cpptoc/request_handler_cpptoc.cc +++ b/libcef_dll/cpptoc/request_handler_cpptoc.cc @@ -326,10 +326,6 @@ int CEF_CALLBACK request_handler_get_auth_credentials( DCHECK(host); if (!host) return 0; - // Verify param: realm; type: string_byref_const - DCHECK(realm); - if (!realm) - return 0; // Verify param: scheme; type: string_byref_const DCHECK(scheme); if (!scheme) @@ -342,6 +338,7 @@ int CEF_CALLBACK request_handler_get_auth_credentials( DCHECK(password); if (!password) return 0; + // Unverified params: realm // Translate param: username; type: string_byref CefString usernameStr(username); diff --git a/libcef_dll/ctocpp/request_handler_ctocpp.cc b/libcef_dll/ctocpp/request_handler_ctocpp.cc index ce006259d..d6b2799f2 100644 --- a/libcef_dll/ctocpp/request_handler_ctocpp.cc +++ b/libcef_dll/ctocpp/request_handler_ctocpp.cc @@ -281,14 +281,11 @@ bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr browser, DCHECK(!host.empty()); if (host.empty()) return false; - // Verify param: realm; type: string_byref_const - DCHECK(!realm.empty()); - if (realm.empty()) - return false; // Verify param: scheme; type: string_byref_const DCHECK(!scheme.empty()); if (scheme.empty()) return false; + // Unverified params: realm // Execute int _retval = struct_->get_auth_credentials(struct_,