From 248ce19f35b73cdd48ba005c7e4e7b3bc34817fc Mon Sep 17 00:00:00 2001 From: "sky@chromium.org" Date: Thu, 10 Feb 2011 15:26:34 +0000 Subject: Attempt 3 at: Splits ChromeURLDataManager into 2 chunks: . ChromeURLDataManager is no longer a singleton and is always used on the UI thread. ChromeURLDataManager is now profile specific (you get from the profile). . ChromeURLDataManagerBackend handles the URLRequests and the DataSources. ChromeURLDataManagerBackend is created by ChromeURLRequestContext. All DataSources are now profile specific. There were two that wanted to be global, but have been converted. This differs from the last version in that DataSource::SendResponse does nothing if the DataSource is schedule for deletion. This is necessary otherwise SendResponse will up the ref count and by the time the request is processed on the IO thread chances are the DataSource will have been deleted. And if it wasn't deleted, it'll get scheduled for deletion again. This has always been possible, it just appears to be more likely with my patch. BUG=52022 71868 TEST=none Review URL: http://codereview.chromium.org/6479007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74432 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/dom_ui/imageburner_ui.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'chrome/browser/chromeos/dom_ui/imageburner_ui.cc') diff --git a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc index 758b47b..8aaa576 100644 --- a/chrome/browser/chromeos/dom_ui/imageburner_ui.cc +++ b/chrome/browser/chromeos/dom_ui/imageburner_ui.cc @@ -649,10 +649,5 @@ ImageBurnUI::ImageBurnUI(TabContents* contents) : DOMUI(contents) { ImageBurnHandler* handler = new ImageBurnHandler(contents); AddMessageHandler((handler)->Attach(this)); ImageBurnUIHTMLSource* html_source = new ImageBurnUIHTMLSource(); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - NewRunnableMethod( - ChromeURLDataManager::GetInstance(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); } -- cgit v1.1