diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 17:58:59 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 17:58:59 +0000 |
commit | 5658ec7812a5fed0bf5d0e87c91cce447581e88b (patch) | |
tree | cd72486f2cce8d47f5d3a107ac56e8b59ac0dad3 /chrome/browser | |
parent | 2de8926fce36960cad7211e10f032de3f985f339 (diff) | |
download | chromium_src-5658ec7812a5fed0bf5d0e87c91cce447581e88b.zip chromium_src-5658ec7812a5fed0bf5d0e87c91cce447581e88b.tar.gz chromium_src-5658ec7812a5fed0bf5d0e87c91cce447581e88b.tar.bz2 |
Partially revert r53873 (and the valgrind suppression for it).
Moving DataSource destruction to the UI thread appears to just leak
memory at shutdown. Finding another way...
BUG=34115
TEST=none
Review URL: http://codereview.chromium.org/3060024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/dom_ui/chrome_url_data_manager.h | 7 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_favicon_source.cc | 3 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_thumbnail_source.cc | 3 |
3 files changed, 1 insertions, 12 deletions
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h index 0e48ce4..389b5fd 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.h +++ b/chrome/browser/dom_ui/chrome_url_data_manager.h @@ -11,7 +11,6 @@ #include "base/task.h" #include "base/ref_counted.h" -#include "chrome/browser/chrome_thread.h" class DictionaryValue; class FilePath; @@ -44,9 +43,7 @@ class ChromeURLDataManager { // An implementation of DataSource should handle calls to // StartDataRequest() by starting its (implementation-specific) asynchronous // request for the data, then call SendResponse() to notify - class DataSource - : public base::RefCountedThreadSafe<DataSource, - ChromeThread::DeleteOnUIThread> { + class DataSource : public base::RefCountedThreadSafe<DataSource> { public: // See source_name_ and message_loop_ below for docs on these parameters. DataSource(const std::string& source_name, @@ -86,8 +83,6 @@ class ChromeURLDataManager { protected: friend class base::RefCountedThreadSafe<DataSource>; - friend struct ChromeThread::DeleteOnThread<ChromeThread::UI>; - friend class DeleteTask<DataSource>; virtual ~DataSource(); diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.cc b/chrome/browser/dom_ui/dom_ui_favicon_source.cc index d658503..5a52346 100644 --- a/chrome/browser/dom_ui/dom_ui_favicon_source.cc +++ b/chrome/browser/dom_ui/dom_ui_favicon_source.cc @@ -17,13 +17,11 @@ DOMUIFavIconSource::DOMUIFavIconSource(Profile* profile) } DOMUIFavIconSource::~DOMUIFavIconSource() { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); } void DOMUIFavIconSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); if (favicon_service) { @@ -58,7 +56,6 @@ void DOMUIFavIconSource::OnFavIconDataAvailable( scoped_refptr<RefCountedMemory> data, bool expired, GURL icon_url) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); FaviconService* favicon_service = profile_->GetFaviconService(Profile::EXPLICIT_ACCESS); int request_id = cancelable_consumer_.GetClientData(favicon_service, diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc index 6e18bd4..fd6eae7 100644 --- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc +++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc @@ -23,13 +23,11 @@ DOMUIThumbnailSource::DOMUIThumbnailSource(Profile* profile) } DOMUIThumbnailSource::~DOMUIThumbnailSource() { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); } void DOMUIThumbnailSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) { scoped_refptr<history::TopSites> top_sites = profile_->GetTopSites(); RefCountedBytes* data = NULL; @@ -75,7 +73,6 @@ void DOMUIThumbnailSource::SendDefaultThumbnail(int request_id) { void DOMUIThumbnailSource::OnThumbnailDataAvailable( HistoryService::Handle request_handle, scoped_refptr<RefCountedBytes> data) { - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); int request_id = cancelable_consumer_.GetClientData(hs, request_handle); |