| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 735cba8acb25dc9e8cff36bb2870cc7a987155a7..87469239af02f8986e16397b97668f1dae48a552 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -761,28 +761,19 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContext() {
|
|
|
| net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
|
| int renderer_child_id) {
|
| - ExtensionService* extension_service =
|
| - extensions::ExtensionSystem::Get(this)->extension_service();
|
| - if (extension_service) {
|
| - const extensions::Extension* extension =
|
| - extension_service->GetIsolatedAppForRenderer(renderer_child_id);
|
| - if (extension)
|
| - return GetRequestContextForStoragePartition(extension->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 GetRequestContextForStoragePartition(id);
|
| + CHECK(rph);
|
| + content::StoragePartition* storage_partition = rph->GetStoragePartition();
|
| +
|
| + // TODO(nasko): Remove this conditional, once browser tag creates a proper
|
| + // storage partition.
|
| + if (rph->IsGuest()) {
|
| + return GetRequestContextForStoragePartition(
|
| + storage_partition->GetPath(), true);
|
| }
|
|
|
| - return GetRequestContext();
|
| + return storage_partition->GetURLRequestContext();
|
| }
|
|
|
| net::URLRequestContextGetter* ProfileImpl::GetMediaRequestContext() {
|
| @@ -793,34 +784,27 @@ net::URLRequestContextGetter* ProfileImpl::GetMediaRequestContext() {
|
| net::URLRequestContextGetter*
|
| ProfileImpl::GetMediaRequestContextForRenderProcess(
|
| int renderer_child_id) {
|
| - ExtensionService* extension_service =
|
| - extensions::ExtensionSystem::Get(this)->extension_service();
|
| - if (extension_service) {
|
| - const extensions::Extension* extension =
|
| - extension_service->GetIsolatedAppForRenderer(renderer_child_id);
|
| - if (extension)
|
| - return io_data_.GetIsolatedMediaRequestContextGetter(extension->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);
|
| + CHECK(rph);
|
| + content::StoragePartition* storage_partition = rph->GetStoragePartition();
|
| +
|
| + // TODO(nasko): Remove this conditional, once browser tag creates a proper
|
| + // storage partition.
|
| + if (rph->IsGuest()) {
|
| + return GetRequestContextForStoragePartition(
|
| + storage_partition->GetPath(), true);
|
| }
|
|
|
| - return io_data_.GetMediaRequestContextGetter();
|
| + return storage_partition->GetMediaURLRequestContext();
|
| }
|
|
|
| net::URLRequestContextGetter*
|
| ProfileImpl::GetMediaRequestContextForStoragePartition(
|
| - const std::string& partition_id) {
|
| - return io_data_.GetIsolatedMediaRequestContextGetter(partition_id);
|
| + const FilePath& partition_path,
|
| + bool in_memory) {
|
| + return io_data_.GetIsolatedMediaRequestContextGetter(partition_path,
|
| + in_memory);
|
| }
|
|
|
| content::ResourceContext* ProfileImpl::GetResourceContext() {
|
| @@ -832,8 +816,9 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() {
|
| }
|
|
|
| net::URLRequestContextGetter* ProfileImpl::GetRequestContextForStoragePartition(
|
| - const std::string& partition_id) {
|
| - return io_data_.GetIsolatedAppRequestContextGetter(partition_id);
|
| + const FilePath& partition_path,
|
| + bool in_memory) {
|
| + return io_data_.GetIsolatedAppRequestContextGetter(partition_path, in_memory);
|
| }
|
|
|
| net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
|
|
|