Make the |target_domain| parameter to CefAddCrossOriginWhitelistEntry and CefRemoveCrossOriginWhitelistEntry optional.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@667 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
b8a3120222
commit
8403acb14b
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -198,10 +198,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(
|
||||
|
@ -227,10 +224,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(
|
||||
|
|
|
@ -200,10 +200,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(
|
||||
|
@ -229,10 +226,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(
|
||||
|
|
Loading…
Reference in New Issue