summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 19:07:08 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 19:07:08 +0000
commit10705a7b86405ba171f4b4237e43f70757b00441 (patch)
tree4ba50ed0f81684cd33d916dec0cd2da3eecf67e6 /content/browser
parentf84278cd1a26aff14aff8d169b68b1edee950591 (diff)
downloadchromium_src-10705a7b86405ba171f4b4237e43f70757b00441.zip
chromium_src-10705a7b86405ba171f4b4237e43f70757b00441.tar.gz
chromium_src-10705a7b86405ba171f4b4237e43f70757b00441.tar.bz2
Ensure that isolated apps use the right cookies for media requests.
Also abstract out the media URLRequestContext logic from ProfileImpl. BUG=141172 TEST=Check cookies attached to video tag request inside an isolated app. Review URL: https://chromiumcodereview.appspot.com/10836305 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/download/download_manager_impl_unittest.cc5
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc4
-rw-r--r--content/browser/resource_context_impl.cc4
3 files changed, 10 insertions, 3 deletions
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 1b40112..56bd819 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -374,7 +374,10 @@ class MockBrowserContext : public content::BrowserContext {
MOCK_METHOD0(GetRequestContext, net::URLRequestContextGetter*());
MOCK_METHOD1(GetRequestContextForRenderProcess,
net::URLRequestContextGetter*(int renderer_child_id));
- MOCK_METHOD0(GetRequestContextForMedia, net::URLRequestContextGetter*());
+ MOCK_METHOD0(GetMediaRequestContext,
+ net::URLRequestContextGetter*());
+ MOCK_METHOD1(GetMediaRequestContextForRenderProcess,
+ net::URLRequestContextGetter*(int renderer_child_id));
MOCK_METHOD0(GetResourceContext, content::ResourceContext*());
MOCK_METHOD0(GetDownloadManagerDelegate, content::DownloadManagerDelegate*());
MOCK_METHOD0(GetGeolocationPermissionContext,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 69ba4f5..b7d83ec 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -188,7 +188,9 @@ class RendererURLRequestContextSelector
int render_child_id)
: request_context_(browser_context->GetRequestContextForRenderProcess(
render_child_id)),
- media_request_context_(browser_context->GetRequestContextForMedia()) {
+ media_request_context_(
+ browser_context->GetMediaRequestContextForRenderProcess(
+ render_child_id)) {
}
virtual net::URLRequestContext* GetRequestContext(
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index f0ebf0f..8281aea 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -277,6 +277,8 @@ void InitializeResourceContext(BrowserContext* browser_context) {
// Add content's URLRequestContext's hooks.
// Check first to avoid memory leak in unittests.
+ // TODO(creis): Do equivalent initializations for isolated app and isolated
+ // media request contexts.
if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -288,7 +290,7 @@ void InitializeResourceContext(BrowserContext* browser_context) {
base::Bind(&InitializeRequestContext,
resource_context,
make_scoped_refptr(
- browser_context->GetRequestContextForMedia())));
+ browser_context->GetMediaRequestContext())));
}
}