| 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 45ee90767c533516b60dca639f4e9150a60edccf..fa78780e723543b55cffa68911acbe5960bc45ce 100644
|
| --- a/chrome/browser/profiles/profile_impl_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc
|
| @@ -251,7 +251,7 @@ ProfileImplIOData::ProfileImplIOData()
|
| ProfileImplIOData::~ProfileImplIOData() {
|
| DestroyResourceContext();
|
|
|
| - if (media_request_context_)
|
| + if (media_request_context_.get())
|
| media_request_context_->AssertNoURLRequests();
|
| }
|
|
|
| @@ -262,7 +262,7 @@ void ProfileImplIOData::LazyInitializeInternal(
|
|
|
| ChromeURLRequestContext* main_context = main_request_context();
|
| ChromeURLRequestContext* extensions_context = extensions_request_context();
|
| - media_request_context_ = new ChromeURLRequestContext;
|
| + media_request_context_.reset(new ChromeURLRequestContext);
|
|
|
| IOThread* const io_thread = profile_params->io_thread;
|
| IOThread::Globals* const io_thread_globals = io_thread->globals();
|
| @@ -274,7 +274,7 @@ void ProfileImplIOData::LazyInitializeInternal(
|
| // Initialize context members.
|
|
|
| ApplyProfileParamsToContext(main_context);
|
| - ApplyProfileParamsToContext(media_request_context_);
|
| + ApplyProfileParamsToContext(media_request_context_.get());
|
| ApplyProfileParamsToContext(extensions_context);
|
|
|
| if (http_server_properties_manager())
|
| @@ -446,9 +446,9 @@ void ProfileImplIOData::LazyInitializeInternal(
|
| lazy_params_.reset();
|
| }
|
|
|
| -scoped_refptr<ChromeURLRequestContext>
|
| +ChromeURLRequestContext*
|
| ProfileImplIOData::InitializeAppRequestContext(
|
| - scoped_refptr<ChromeURLRequestContext> main_context,
|
| + ChromeURLRequestContext* main_context,
|
| const std::string& app_id) const {
|
| AppRequestContext* context = new AppRequestContext;
|
|
|
| @@ -508,18 +508,18 @@ ProfileImplIOData::InitializeAppRequestContext(
|
| return context;
|
| }
|
|
|
| -scoped_refptr<ChromeURLRequestContext>
|
| +ChromeURLRequestContext*
|
| ProfileImplIOData::AcquireMediaRequestContext() const {
|
| - DCHECK(media_request_context_);
|
| - return media_request_context_;
|
| + DCHECK(media_request_context_.get());
|
| + return media_request_context_.get();
|
| }
|
|
|
| -scoped_refptr<ChromeURLRequestContext>
|
| +ChromeURLRequestContext*
|
| ProfileImplIOData::AcquireIsolatedAppRequestContext(
|
| - scoped_refptr<ChromeURLRequestContext> main_context,
|
| + ChromeURLRequestContext* main_context,
|
| const std::string& app_id) const {
|
| // We create per-app contexts on demand, unlike the others above.
|
| - scoped_refptr<ChromeURLRequestContext> app_request_context =
|
| + ChromeURLRequestContext* app_request_context =
|
| InitializeAppRequestContext(main_context, app_id);
|
| DCHECK(app_request_context);
|
| return app_request_context;
|
|
|