Make the |target_domain| parameter to CefAddCrossOriginWhitelistEntry and CefRemoveCrossOriginWhitelistEntry optional (issue #609).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@668 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2012-06-04 18:45:44 +00:00
parent 8403acb14b
commit f74e3f4bc9
4 changed files with 16 additions and 22 deletions

View File

@ -67,8 +67,11 @@ extern "C" {
// the same-origin policy. Scripts hosted underneath the fully qualified
// |source_origin| URL (like http://www.example.com) will be allowed access to
// all resources hosted on the specified |target_protocol| and |target_domain|.
// If |allow_target_subdomains| is true (1) access will also be allowed to all
// subdomains of the target domain.
// If |target_domain| is non-NULL and |allow_target_subdomains| if false (0)
// only exact domain matches will be allowed. If |target_domain| is non-NULL and
// |allow_target_subdomains| is true (1) sub-domain matches will be allowed. If
// |target_domain| is NULL and |allow_target_subdomains| if true (1) all domains
// and IP addresses will be allowed.
//
// This function cannot be used to bypass the restrictions on local or display
// isolated schemes. See the comments on CefRegisterCustomScheme for more

View File

@ -63,8 +63,11 @@
// the same-origin policy. Scripts hosted underneath the fully qualified
// |source_origin| URL (like http://www.example.com) will be allowed access to
// all resources hosted on the specified |target_protocol| and |target_domain|.
// If |allow_target_subdomains| is true access will also be allowed to all
// subdomains of the target domain.
// If |target_domain| is non-empty and |allow_target_subdomains| if false only
// exact domain matches will be allowed. If |target_domain| is non-empty and
// |allow_target_subdomains| is true sub-domain matches will be allowed. If
// |target_domain| is empty and |allow_target_subdomains| if true all domains
// and IP addresses will be allowed.
//
// This method cannot be used to bypass the restrictions on local or display
// isolated schemes. See the comments on CefRegisterCustomScheme for more
@ -73,7 +76,7 @@
// This function may be called on any thread. Returns false if |source_origin|
// is invalid or the whitelist cannot be accessed.
///
/*--cef()--*/
/*--cef(optional_param=target_domain)--*/
bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
const CefString& target_protocol,
const CefString& target_domain,
@ -83,7 +86,7 @@ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
// Remove an entry from the cross-origin access whitelist. Returns false if
// |source_origin| is invalid or the whitelist cannot be accessed.
///
/*--cef()--*/
/*--cef(optional_param=target_domain)--*/
bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin,
const CefString& target_protocol,
const CefString& target_domain,

View File

@ -235,10 +235,7 @@ CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
DCHECK(target_protocol);
if (!target_protocol)
return 0;
// Verify param: target_domain; type: string_byref_const
DCHECK(target_domain);
if (!target_domain)
return 0;
// Unverified params: target_domain
// Execute
bool _retval = CefAddCrossOriginWhitelistEntry(
@ -264,10 +261,7 @@ CEF_EXPORT int cef_remove_cross_origin_whitelist_entry(
DCHECK(target_protocol);
if (!target_protocol)
return 0;
// Verify param: target_domain; type: string_byref_const
DCHECK(target_domain);
if (!target_domain)
return 0;
// Unverified params: target_domain
// Execute
bool _retval = CefRemoveCrossOriginWhitelistEntry(

View File

@ -227,10 +227,7 @@ CEF_GLOBAL bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin,
DCHECK(!target_protocol.empty());
if (target_protocol.empty())
return false;
// Verify param: target_domain; type: string_byref_const
DCHECK(!target_domain.empty());
if (target_domain.empty())
return false;
// Unverified params: target_domain
// Execute
int _retval = cef_add_cross_origin_whitelist_entry(
@ -256,10 +253,7 @@ CEF_GLOBAL bool CefRemoveCrossOriginWhitelistEntry(
DCHECK(!target_protocol.empty());
if (target_protocol.empty())
return false;
// Verify param: target_domain; type: string_byref_const
DCHECK(!target_domain.empty());
if (target_domain.empty())
return false;
// Unverified params: target_domain
// Execute
int _retval = cef_remove_cross_origin_whitelist_entry(