summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-14 16:51:25 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-14 16:51:25 +0000
commit84d5b453e3b8f4eef8cab9860a27c25466c7fe0a (patch)
tree5cb1af47b6e7fd98e81bcd2500c65a7070ed2d51 /ppapi/cpp
parentc87f49e41dbf531ec55887d611e0175d4ddcd8e8 (diff)
downloadchromium_src-84d5b453e3b8f4eef8cab9860a27c25466c7fe0a.zip
chromium_src-84d5b453e3b8f4eef8cab9860a27c25466c7fe0a.tar.gz
chromium_src-84d5b453e3b8f4eef8cab9860a27c25466c7fe0a.tar.bz2
Add CORS options to URL requests. This information will be used by the URLLoader to create the AssociatedURLLoader that sends the request.
The CORS options are simplified to fit with what is already in PPAPI. For example, since we already have a trusted interface with universal access, setting the PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS property TRUE corresponds to using access control to check the request. If we want to remove the trusted interface, then we should modify this CL so that we can specify Allow, Deny, or UseAccessControl. Also, I chose not to expose the SniffContent option from WebKit's loader. BUG=47354 TEST=test_shell_tests Review URL: http://codereview.chromium.org/6755015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r--ppapi/cpp/url_request_info.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ppapi/cpp/url_request_info.h b/ppapi/cpp/url_request_info.h
index 2530085..9d38c69 100644
--- a/ppapi/cpp/url_request_info.h
+++ b/ppapi/cpp/url_request_info.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -58,6 +58,12 @@ class URLRequestInfo : public Resource {
bool SetCustomReferrerURL(const Var& url_string) {
return SetProperty(PP_URLREQUESTPROPERTY_CUSTOMREFERRERURL, url_string);
}
+ bool SetAllowCrossOriginRequests(bool enable) {
+ return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS, enable);
+ }
+ bool SetAllowCredentials(bool enable) {
+ return SetProperty(PP_URLREQUESTPROPERTY_ALLOWCREDENTIALS, enable);
+ }
};
} // namespace pp