summaryrefslogtreecommitdiffstats
path: root/webkit/glue/media
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/media')
-rw-r--r--webkit/glue/media/buffered_resource_loader.cc11
-rw-r--r--webkit/glue/media/simple_data_source.cc11
2 files changed, 18 insertions, 4 deletions
diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc
index e262233..6522726 100644
--- a/webkit/glue/media/buffered_resource_loader.cc
+++ b/webkit/glue/media/buffered_resource_loader.cc
@@ -13,6 +13,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderOptions.h"
#include "webkit/glue/multipart_response_delegate.h"
#include "webkit/glue/webkit_glue.h"
@@ -20,6 +21,7 @@ using WebKit::WebFrame;
using WebKit::WebString;
using WebKit::WebURLError;
using WebKit::WebURLLoader;
+using WebKit::WebURLLoaderOptions;
using WebKit::WebURLRequest;
using WebKit::WebURLResponse;
using webkit_glue::MultipartResponseDelegate;
@@ -124,8 +126,13 @@ void BufferedResourceLoader::Start(net::CompletionCallback* start_callback,
WebString::fromUTF8("identity;q=1, *;q=0"));
// This flag is for unittests as we don't want to reset |url_loader|
- if (!keep_test_loader_)
- url_loader_.reset(frame->createAssociatedURLLoader());
+ if (!keep_test_loader_) {
+ WebURLLoaderOptions options;
+ options.allowCredentials = true;
+ options.crossOriginRequestPolicy =
+ WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
+ url_loader_.reset(frame->createAssociatedURLLoader(options));
+ }
// Start the resource loading.
url_loader_->loadAsynchronously(request, this);
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index 97c4d7a..48c2044 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -14,10 +14,12 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderOptions.h"
#include "webkit/glue/media/web_data_source_factory.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebString;
+using WebKit::WebURLLoaderOptions;
namespace webkit_glue {
@@ -300,8 +302,13 @@ void SimpleDataSource::StartTask() {
WebString::fromUTF8("identity;q=1, *;q=0"));
// This flag is for unittests as we don't want to reset |url_loader|
- if (!keep_test_loader_)
- url_loader_.reset(frame_->createAssociatedURLLoader());
+ if (!keep_test_loader_) {
+ WebURLLoaderOptions options;
+ options.allowCredentials = true;
+ options.crossOriginRequestPolicy =
+ WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
+ url_loader_.reset(frame_->createAssociatedURLLoader(options));
+ }
// Start the resource loading.
url_loader_->loadAsynchronously(request, this);