summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profiles/profile_impl_io_data.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 16:41:28 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 16:41:28 +0000
commit18590f24c69ded8500cf6970b4071654cdb22db4 (patch)
tree586d5840d97998ec4fe98d9192ef7c8504e3057b /chrome/browser/profiles/profile_impl_io_data.cc
parentcfea39e639180ae6b96403c0a80546a6109ba62b (diff)
downloadchromium_src-18590f24c69ded8500cf6970b4071654cdb22db4.zip
chromium_src-18590f24c69ded8500cf6970b4071654cdb22db4.tar.gz
chromium_src-18590f24c69ded8500cf6970b4071654cdb22db4.tar.bz2
Reland r94047 - Make Profile own ProfileIOData.
Unfortunately some URLFetchers were still alive. We have to kill them all before we kill the Profiles. BUG=64339 TEST=none Review URL: http://codereview.chromium.org/7533014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile_impl_io_data.cc')
-rw-r--r--chrome/browser/profiles/profile_impl_io_data.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index f917b1a..fa95deb 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -49,7 +49,7 @@ ProfileImplIOData::Handle::~Handle() {
iter->second->CleanupOnUIThread();
}
- io_data_.release()->ShutdownOnUIThread();
+ io_data_->ShutdownOnUIThread();
}
void ProfileImplIOData::Handle::Init(const FilePath& cookie_path,
@@ -81,7 +81,7 @@ ProfileImplIOData::Handle::GetChromeURLDataManagerBackendGetter() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LazyInitialize();
return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend,
- base::Unretained(io_data_.get()));
+ base::Unretained(io_data_));
}
const content::ResourceContext&
@@ -185,7 +185,7 @@ void ProfileImplIOData::LazyInitializeInternal(
ChromeURLRequestContext* main_context = main_request_context();
ChromeURLRequestContext* extensions_context = extensions_request_context();
- media_request_context_ = new RequestContext;
+ media_request_context_ = new ChromeURLRequestContext;
IOThread* const io_thread = profile_params->io_thread;
IOThread::Globals* const io_thread_globals = io_thread->globals();
@@ -310,11 +310,11 @@ void ProfileImplIOData::LazyInitializeInternal(
lazy_params_.reset();
}
-scoped_refptr<ProfileIOData::RequestContext>
+scoped_refptr<ChromeURLRequestContext>
ProfileImplIOData::InitializeAppRequestContext(
scoped_refptr<ChromeURLRequestContext> main_context,
const std::string& app_id) const {
- ProfileIOData::AppRequestContext* context = new AppRequestContext(app_id);
+ AppRequestContext* context = new AppRequestContext;
// Copy most state from the main context.
context->CopyFrom(main_context);
@@ -375,19 +375,15 @@ ProfileImplIOData::InitializeAppRequestContext(
scoped_refptr<ChromeURLRequestContext>
ProfileImplIOData::AcquireMediaRequestContext() const {
DCHECK(media_request_context_);
- scoped_refptr<ChromeURLRequestContext> context = media_request_context_;
- media_request_context_->set_profile_io_data(
- const_cast<ProfileImplIOData*>(this));
- media_request_context_ = NULL;
- return context;
+ return media_request_context_;
}
-scoped_refptr<ProfileIOData::RequestContext>
+scoped_refptr<ChromeURLRequestContext>
ProfileImplIOData::AcquireIsolatedAppRequestContext(
scoped_refptr<ChromeURLRequestContext> main_context,
const std::string& app_id) const {
// We create per-app contexts on demand, unlike the others above.
- scoped_refptr<RequestContext> app_request_context =
+ scoped_refptr<ChromeURLRequestContext> app_request_context =
InitializeAppRequestContext(main_context, app_id);
DCHECK(app_request_context);
return app_request_context;