Commit 7b0ead97 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Allow cross-origin requests for relay http requests made in Transport API.

Currently, when creating relay sessions the Transport API can make
cross-origin http requests only when the web app has explicit access to
the relay domain. This is not really neccessary because Transport API
can only be used by chromoting client plugin which is trusted.
PPB_URLLoader API allows cross-origin requests for trusted plugins, so
Transport API should be allowed to make them too. Changed
API implementation to allow cross-origin requests.

BUG=103992,104195

Review URL: http://codereview.chromium.org/8566012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109973 0039d316-1c4b-4281-b951-d872f2087c98
parent ade085b2
...@@ -177,8 +177,13 @@ void P2PPortAllocatorSession::AllocateRelaySession() { ...@@ -177,8 +177,13 @@ void P2PPortAllocatorSession::AllocateRelaySession() {
WebURLLoaderOptions options; WebURLLoaderOptions options;
options.allowCredentials = false; options.allowCredentials = false;
// TODO(sergeyu): Set to CrossOriginRequestPolicyUseAccessControl
// when this code can be used by untrusted plugins.
// See http://crbug.com/104195 .
options.crossOriginRequestPolicy = options.crossOriginRequestPolicy =
WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl; WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
relay_session_request_.reset( relay_session_request_.reset(
allocator_->web_frame_->createAssociatedURLLoader(options)); allocator_->web_frame_->createAssociatedURLLoader(options));
if (!relay_session_request_.get()) { if (!relay_session_request_.get()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment