| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 259a4e0d336313865bc4deefe8ba63f3ea4aac7f..8ba1a17a22c197ca29eb977a78ffa4189e3bf7f7 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -683,9 +683,8 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
|
| if (extension_service) {
|
| const extensions::Extension* installed_app = extension_service->
|
| GetInstalledAppForRenderer(renderer_child_id);
|
| - if (installed_app != NULL && installed_app->is_storage_isolated()) {
|
| + if (installed_app != NULL && installed_app->is_storage_isolated())
|
| return GetRequestContextForIsolatedApp(installed_app->id());
|
| - }
|
| }
|
|
|
| content::RenderProcessHost* rph = content::RenderProcessHost::FromID(
|
| @@ -703,7 +702,29 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
|
| return GetRequestContext();
|
| }
|
|
|
| -net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() {
|
| +net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia(
|
| + int renderer_child_id) {
|
| + ExtensionService* extension_service =
|
| + extensions::ExtensionSystem::Get(this)->extension_service();
|
| + if (extension_service) {
|
| + const extensions::Extension* installed_app = extension_service->
|
| + GetInstalledAppForRenderer(renderer_child_id);
|
| + if (installed_app != NULL && installed_app->is_storage_isolated())
|
| + return io_data_.GetIsolatedMediaRequestContextGetter(installed_app->id());
|
| + }
|
| +
|
| + content::RenderProcessHost* rph = content::RenderProcessHost::FromID(
|
| + renderer_child_id);
|
| + if (rph && rph->IsGuest()) {
|
| + // For guest processes (used by the browser tag), we need to isolate the
|
| + // storage.
|
| + // TODO(nasko): Until we have proper storage partitions, create a
|
| + // non-persistent context using the RPH's id.
|
| + std::string id("guest-");
|
| + id.append(base::IntToString(renderer_child_id));
|
| + return io_data_.GetIsolatedMediaRequestContextGetter(id);
|
| + }
|
| +
|
| return io_data_.GetMediaRequestContextGetter();
|
| }
|
|
|
|
|