diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:58:06 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:58:06 +0000 |
commit | 5c4c7402c5264a38aa3a25e0e17caaf3222e5a61 (patch) | |
tree | 667cdde7c423e2956d2163ab31639d82c60f54b6 /chrome/browser/dom_ui/most_visited_handler.cc | |
parent | b56e068deff08469f2f36c30a808de60fa07a31a (diff) | |
download | chromium_src-5c4c7402c5264a38aa3a25e0e17caaf3222e5a61.zip chromium_src-5c4c7402c5264a38aa3a25e0e17caaf3222e5a61.tar.gz chromium_src-5c4c7402c5264a38aa3a25e0e17caaf3222e5a61.tar.bz2 |
Convert chrome_url_data_manager (previously a global) into a Singleton. This
is just cleanup.
Take 2 with a fix in sync code.
TBR=evanm
Review URL: http://codereview.chromium.org/350007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/most_visited_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/most_visited_handler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc index 7aa82f8..a0e52bc 100644 --- a/chrome/browser/dom_ui/most_visited_handler.cc +++ b/chrome/browser/dom_ui/most_visited_handler.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/md5.h" +#include "base/singleton.h" #include "base/string_util.h" #include "base/thread.h" #include "base/values.h" @@ -60,7 +61,7 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) { new DOMUIThumbnailSource(dom_ui->GetProfile()); bool posted = ChromeThread::PostTask( ChromeThread::IO, FROM_HERE, - NewRunnableMethod(&chrome_url_data_manager, + NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), &ChromeURLDataManager::AddDataSource, thumbnail_src)); if (!posted) { thumbnail_src->AddRef(); @@ -70,7 +71,7 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) { DOMUIFavIconSource* favicon_src = new DOMUIFavIconSource(dom_ui->GetProfile()); posted = ChromeThread::PostTask( ChromeThread::IO, FROM_HERE, - NewRunnableMethod(&chrome_url_data_manager, + NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), &ChromeURLDataManager::AddDataSource, favicon_src)); if (!posted) { favicon_src->AddRef(); |