This source file includes following definitions.
- m_originRestriction
- m_originRestriction
- m_originRestriction
- setCrossOriginAccessControl
- setCrossOriginAccessControl
- setCrossOriginAccessControl
#include "config.h"
#include "core/fetch/FetchRequest.h"
#include "core/fetch/CrossOriginAccessControl.h"
#include "core/fetch/ResourceFetcher.h"
namespace WebCore {
FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicString& initiator, const String& charset, ResourceLoadPriority priority)
: m_resourceRequest(resourceRequest)
, m_charset(charset)
, m_options(ResourceFetcher::defaultResourceOptions())
, m_priority(priority)
, m_forPreload(false)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo.name = initiator;
}
FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicString& initiator, const ResourceLoaderOptions& options)
: m_resourceRequest(resourceRequest)
, m_options(options)
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo.name = initiator;
}
FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const FetchInitiatorInfo& initiator)
: m_resourceRequest(resourceRequest)
, m_options(ResourceFetcher::defaultResourceOptions())
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_defer(NoDefer)
, m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo = initiator;
}
FetchRequest::~FetchRequest()
{
}
void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, StoredCredentials allowCredentials, CredentialRequest requested)
{
ASSERT(requested == ClientDidNotRequestCredentials || allowCredentials == AllowStoredCredentials);
updateRequestForAccessControl(m_resourceRequest, origin, allowCredentials);
m_options.corsEnabled = IsCORSEnabled;
m_options.securityOrigin = origin;
m_options.credentialsRequested = requested;
}
void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, StoredCredentials allowCredentials)
{
setCrossOriginAccessControl(origin, allowCredentials, allowCredentials == AllowStoredCredentials ? ClientRequestedCredentials : ClientDidNotRequestCredentials);
}
void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, const AtomicString& crossOriginMode)
{
setCrossOriginAccessControl(origin, equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials);
}
}