Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2550)

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 2536723009: Make net::URLRequestContext a MemoryDumpProvider (Closed)
Patch Set: fix compile Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 88da0c78fdcab3da741439d4f5bbe52166002ece..87e8b891f3f9c6252b21302b33ba8d8a1b357873 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -574,9 +574,8 @@ void ProfileImplIOData::InitializeInternal(
// Create a media request context based on the main context, but using a
// media cache. It shares the same job factory as the main context.
StoragePartitionDescriptor details(profile_path_, false);
- media_request_context_.reset(InitializeMediaRequestContext(main_context,
- details));
-
+ media_request_context_.reset(
+ InitializeMediaRequestContext(main_context, details, "main_media"));
lazy_params_.reset();
}
@@ -716,12 +715,12 @@ net::URLRequestContext* ProfileImplIOData::InitializeAppRequestContext(
return context;
}
-net::URLRequestContext*
-ProfileImplIOData::InitializeMediaRequestContext(
+net::URLRequestContext* ProfileImplIOData::InitializeMediaRequestContext(
net::URLRequestContext* original_context,
- const StoragePartitionDescriptor& partition_descriptor) const {
+ const StoragePartitionDescriptor& partition_descriptor,
+ const std::string& name) const {
// Copy most state from the original context.
- MediaRequestContext* context = new MediaRequestContext();
+ MediaRequestContext* context = new MediaRequestContext(name);
context->CopyFrom(original_context);
// For in-memory context, return immediately after creating the new
@@ -791,8 +790,8 @@ ProfileImplIOData::AcquireIsolatedMediaRequestContext(
net::URLRequestContext* app_context,
const StoragePartitionDescriptor& partition_descriptor) const {
// We create per-app media contexts on demand, unlike the others above.
- net::URLRequestContext* media_request_context =
- InitializeMediaRequestContext(app_context, partition_descriptor);
+ net::URLRequestContext* media_request_context = InitializeMediaRequestContext(
+ app_context, partition_descriptor, "isolated_media");
DCHECK(media_request_context);
return media_request_context;
}
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698