diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 08:15:04 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 08:15:04 +0000 |
commit | d3c6c0d77db083fbb68f81589acf4fc7c58a1fad (patch) | |
tree | c4f00bd9c7205cd3ec60533e86e2e2023acc6b83 /chrome/browser/dom_ui | |
parent | ee16679f293ca27ce3d822a97efad7d3fa8a049e (diff) | |
download | chromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.zip chromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.tar.gz chromium_src-d3c6c0d77db083fbb68f81589acf4fc7c58a1fad.tar.bz2 |
Add a new GetInstance() method for singleton classes used in chrome/browser files.
This CL includes half of the files under chrome/browser using Singleton<T>.
The rest of the files will be sent in a second CL.
In one case I used a LazyInstance<T> instead of Singleton<T> as that was simpler and necessary since T was a typedef and can't add member functions to it.
BUG=65298
TEST=all existing tests should continue to pass.
Review URL: http://codereview.chromium.org/5519016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
24 files changed, 65 insertions, 54 deletions
diff --git a/chrome/browser/dom_ui/bookmarks_ui.cc b/chrome/browser/dom_ui/bookmarks_ui.cc index c824f67..1875d45 100644 --- a/chrome/browser/dom_ui/bookmarks_ui.cc +++ b/chrome/browser/dom_ui/bookmarks_ui.cc @@ -51,7 +51,7 @@ BookmarksUI::BookmarksUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/bug_report_ui.cc b/chrome/browser/dom_ui/bug_report_ui.cc index 74ac629..4d8bc83 100644 --- a/chrome/browser/dom_ui/bug_report_ui.cc +++ b/chrome/browser/dom_ui/bug_report_ui.cc @@ -511,7 +511,7 @@ void BugReportHandler::ClobberScreenshotsSource() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIScreenshotSource(NULL)))); @@ -530,7 +530,7 @@ void BugReportHandler::SetupScreenshotsSource() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(screenshot_source_))); } @@ -803,7 +803,7 @@ BugReportUI::BugReportUI(TabContents* tab) : HtmlDialogUI(tab) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc index 2e6cec9..6153458 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.cc +++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc @@ -96,7 +96,7 @@ class URLRequestChromeFileJob : public URLRequestFileJob { void RegisterURLRequestChromeJob() { FilePath inspector_dir; if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { - Singleton<ChromeURLDataManager>()->AddFileSource( + ChromeURLDataManager::GetInstance()->AddFileSource( chrome::kChromeUIDevToolsHost, inspector_dir); } @@ -110,7 +110,7 @@ void RegisterURLRequestChromeJob() { void UnregisterURLRequestChromeJob() { FilePath inspector_dir; if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { - Singleton<ChromeURLDataManager>()->RemoveFileSource( + ChromeURLDataManager::GetInstance()->RemoveFileSource( chrome::kChromeUIDevToolsHost); } } @@ -158,8 +158,8 @@ bool ChromeURLDataManager::URLToFilePath(const GURL& url, URLToRequest(stripped_url, &source_name, &relative_path); FileSourceMap::const_iterator i( - Singleton<ChromeURLDataManager>()->file_sources_.find(source_name)); - if (i == Singleton<ChromeURLDataManager>()->file_sources_.end()) + ChromeURLDataManager::GetInstance()->file_sources_.find(source_name)); + if (i == ChromeURLDataManager::GetInstance()->file_sources_.end()) return false; // Check that |relative_path| is not an absolute path (otherwise AppendASCII() @@ -178,6 +178,11 @@ ChromeURLDataManager::ChromeURLDataManager() : next_request_id_(0) { } ChromeURLDataManager::~ChromeURLDataManager() { } +// static +ChromeURLDataManager* ChromeURLDataManager::GetInstance() { + return Singleton<ChromeURLDataManager>::get(); +} + void ChromeURLDataManager::AddDataSource(scoped_refptr<DataSource> source) { // TODO(jackson): A new data source with same name should not clobber the // existing one. @@ -287,7 +292,7 @@ void ChromeURLDataManager::DataSource::SendResponse( RefCountedMemory* bytes) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), + NewRunnableMethod(ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::DataAvailable, request_id, scoped_refptr<RefCountedMemory>(bytes))); } @@ -347,7 +352,7 @@ URLRequestChromeJob::URLRequestChromeJob(net::URLRequest* request) } URLRequestChromeJob::~URLRequestChromeJob() { - CHECK(!Singleton<ChromeURLDataManager>()->HasPendingJob(this)); + CHECK(!ChromeURLDataManager::GetInstance()->HasPendingJob(this)); } void URLRequestChromeJob::Start() { @@ -358,7 +363,7 @@ void URLRequestChromeJob::Start() { } void URLRequestChromeJob::Kill() { - Singleton<ChromeURLDataManager>()->RemoveRequest(this); + ChromeURLDataManager::GetInstance()->RemoveRequest(this); } bool URLRequestChromeJob::GetMimeType(std::string* mime_type) const { @@ -418,7 +423,8 @@ void URLRequestChromeJob::StartAsync() { if (!request_) return; - if (Singleton<ChromeURLDataManager>()->StartRequest(request_->url(), this)) { + if (ChromeURLDataManager::GetInstance()->StartRequest(request_->url(), + this)) { NotifyHeadersComplete(); } else { NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.h b/chrome/browser/dom_ui/chrome_url_data_manager.h index c6b6e76..709cdcb 100644 --- a/chrome/browser/dom_ui/chrome_url_data_manager.h +++ b/chrome/browser/dom_ui/chrome_url_data_manager.h @@ -9,6 +9,7 @@ #include <map> #include <string> +#include "base/singleton.h" #include "base/task.h" #include "base/ref_counted.h" @@ -32,8 +33,8 @@ class URLRequestJob; // it from the UI thread needs to go through an InvokeLater. class ChromeURLDataManager { public: - ChromeURLDataManager(); - ~ChromeURLDataManager(); + // Returns the singleton instance. + static ChromeURLDataManager* GetInstance(); typedef int RequestID; @@ -122,6 +123,10 @@ class ChromeURLDataManager { private: friend class URLRequestChromeJob; + friend struct DefaultSingletonTraits<ChromeURLDataManager>; + + ChromeURLDataManager(); + ~ChromeURLDataManager(); // Parse a URL into the components used to resolve its request. static void URLToRequest(const GURL& url, diff --git a/chrome/browser/dom_ui/conflicts_ui.cc b/chrome/browser/dom_ui/conflicts_ui.cc index f1e6261..8e2bcae 100644 --- a/chrome/browser/dom_ui/conflicts_ui.cc +++ b/chrome/browser/dom_ui/conflicts_ui.cc @@ -204,9 +204,9 @@ ConflictsUI::ConflictsUI(TabContents* contents) : DOMUI(contents) { // Set up the about:conflicts source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } // static diff --git a/chrome/browser/dom_ui/downloads_dom_handler.cc b/chrome/browser/dom_ui/downloads_dom_handler.cc index 919497b..a825c39 100644 --- a/chrome/browser/dom_ui/downloads_dom_handler.cc +++ b/chrome/browser/dom_ui/downloads_dom_handler.cc @@ -52,7 +52,7 @@ DownloadsDOMHandler::DownloadsDOMHandler(DownloadManager* dlm) BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new FileIconSource()))); } diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc index 3ce665a..9c033ea 100644 --- a/chrome/browser/dom_ui/downloads_ui.cc +++ b/chrome/browser/dom_ui/downloads_ui.cc @@ -136,9 +136,9 @@ DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) { // Set up the chrome://downloads/ source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } // static diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc index 6b7401b..764b310 100644 --- a/chrome/browser/dom_ui/filebrowse_ui.cc +++ b/chrome/browser/dom_ui/filebrowse_ui.cc @@ -422,7 +422,7 @@ DOMMessageHandler* FilebrowseHandler::Attach(DOMUI* dom_ui) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); profile_ = dom_ui->GetProfile(); @@ -1129,7 +1129,7 @@ FileBrowseUI::FileBrowseUI(TabContents* contents) : HtmlDialogUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/flags_ui.cc b/chrome/browser/dom_ui/flags_ui.cc index 8198bbb..76d4bdd 100644 --- a/chrome/browser/dom_ui/flags_ui.cc +++ b/chrome/browser/dom_ui/flags_ui.cc @@ -183,9 +183,9 @@ FlagsUI::FlagsUI(TabContents* contents) : DOMUI(contents) { // Set up the about:flags source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } // static diff --git a/chrome/browser/dom_ui/history2_ui.cc b/chrome/browser/dom_ui/history2_ui.cc index 4f6867b..3e9f67e 100644 --- a/chrome/browser/dom_ui/history2_ui.cc +++ b/chrome/browser/dom_ui/history2_ui.cc @@ -126,7 +126,7 @@ DOMMessageHandler* BrowsingHistoryHandler2::Attach(DOMUI* dom_ui) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); @@ -398,7 +398,7 @@ HistoryUI2::HistoryUI2(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc index e01accf..a90fcfc 100644 --- a/chrome/browser/dom_ui/history_ui.cc +++ b/chrome/browser/dom_ui/history_ui.cc @@ -126,7 +126,7 @@ DOMMessageHandler* BrowsingHistoryHandler::Attach(DOMUI* dom_ui) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); @@ -386,7 +386,7 @@ HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/keyboard_ui.cc b/chrome/browser/dom_ui/keyboard_ui.cc index a935c84..3fba150 100644 --- a/chrome/browser/dom_ui/keyboard_ui.cc +++ b/chrome/browser/dom_ui/keyboard_ui.cc @@ -23,7 +23,7 @@ KeyboardUI::KeyboardUI(TabContents* contents) BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/mediaplayer_ui.cc b/chrome/browser/dom_ui/mediaplayer_ui.cc index 7a26000..2fb141c 100644 --- a/chrome/browser/dom_ui/mediaplayer_ui.cc +++ b/chrome/browser/dom_ui/mediaplayer_ui.cc @@ -212,7 +212,7 @@ DOMMessageHandler* MediaplayerHandler::Attach(DOMUI* dom_ui) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); @@ -610,7 +610,7 @@ MediaplayerUI::MediaplayerUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc index fd27902..798a600 100644 --- a/chrome/browser/dom_ui/most_visited_handler.cc +++ b/chrome/browser/dom_ui/most_visited_handler.cc @@ -75,7 +75,7 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) { new DOMUIThumbnailSource(dom_ui->GetProfile()); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), + NewRunnableMethod(ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(thumbnail_src))); @@ -83,7 +83,7 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) { new DOMUIFavIconSource(dom_ui->GetProfile()); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), + NewRunnableMethod(ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(favicon_src))); diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 35d1a44..8fa9e9b8 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -1027,7 +1027,7 @@ NetInternalsUI::NetInternalsUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index f2f0196..3ac44e4 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -395,7 +395,7 @@ NewTabUI::NewTabUI(TabContents* contents) BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); @@ -442,7 +442,7 @@ void NewTabUI::InitializeCSSCaches() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(theme))); } diff --git a/chrome/browser/dom_ui/options/browser_options_handler.cc b/chrome/browser/dom_ui/options/browser_options_handler.cc index c8e7b18..483e640 100644 --- a/chrome/browser/dom_ui/options/browser_options_handler.cc +++ b/chrome/browser/dom_ui/options/browser_options_handler.cc @@ -115,7 +115,7 @@ void BrowserOptionsHandler::Initialize() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui_->GetProfile())))); diff --git a/chrome/browser/dom_ui/options/options_ui.cc b/chrome/browser/dom_ui/options/options_ui.cc index 82e9cb1..5a38d84 100644 --- a/chrome/browser/dom_ui/options/options_ui.cc +++ b/chrome/browser/dom_ui/options/options_ui.cc @@ -192,7 +192,7 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); @@ -201,7 +201,7 @@ OptionsUI::OptionsUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(theme))); } diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc index 8c37602..94e12b1 100644 --- a/chrome/browser/dom_ui/plugins_ui.cc +++ b/chrome/browser/dom_ui/plugins_ui.cc @@ -316,9 +316,9 @@ PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) { // Set up the chrome://plugins/ source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/print_preview_ui.cc b/chrome/browser/dom_ui/print_preview_ui.cc index 91032a7..f0f7656 100644 --- a/chrome/browser/dom_ui/print_preview_ui.cc +++ b/chrome/browser/dom_ui/print_preview_ui.cc @@ -140,7 +140,7 @@ PrintPreviewUI::PrintPreviewUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new PrintPreviewUIHTMLSource()))); } diff --git a/chrome/browser/dom_ui/remoting_ui.cc b/chrome/browser/dom_ui/remoting_ui.cc index 90ceb52..0bdb717 100644 --- a/chrome/browser/dom_ui/remoting_ui.cc +++ b/chrome/browser/dom_ui/remoting_ui.cc @@ -66,9 +66,9 @@ RemotingUI::RemotingUI(TabContents* contents) : DOMUI(contents) { // Set up the chrome://remoting source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/shared_resources_data_source.cc b/chrome/browser/dom_ui/shared_resources_data_source.cc index 25a45cb..6ff8343 100644 --- a/chrome/browser/dom_ui/shared_resources_data_source.cc +++ b/chrome/browser/dom_ui/shared_resources_data_source.cc @@ -57,7 +57,7 @@ void SharedResourcesDataSource::Register() { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(source))); } diff --git a/chrome/browser/dom_ui/slideshow_ui.cc b/chrome/browser/dom_ui/slideshow_ui.cc index 5c66e0e..da8a807 100644 --- a/chrome/browser/dom_ui/slideshow_ui.cc +++ b/chrome/browser/dom_ui/slideshow_ui.cc @@ -153,7 +153,7 @@ DOMMessageHandler* SlideshowHandler::Attach(DOMUI* dom_ui) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(new DOMUIFavIconSource(dom_ui->GetProfile())))); profile_ = dom_ui->GetProfile(); @@ -288,7 +288,7 @@ SlideshowUI::SlideshowUI(TabContents* contents) : DOMUI(contents) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - Singleton<ChromeURLDataManager>::get(), + ChromeURLDataManager::GetInstance(), &ChromeURLDataManager::AddDataSource, make_scoped_refptr(html_source))); } diff --git a/chrome/browser/dom_ui/textfields_ui.cc b/chrome/browser/dom_ui/textfields_ui.cc index db4fb0c..a74f10d 100644 --- a/chrome/browser/dom_ui/textfields_ui.cc +++ b/chrome/browser/dom_ui/textfields_ui.cc @@ -70,7 +70,7 @@ TextfieldsUI::TextfieldsUI(TabContents* contents) : DOMUI(contents) { // Set up the chrome://textfields/ source. BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), - &ChromeURLDataManager::AddDataSource, - make_scoped_refptr(html_source))); + NewRunnableMethod(ChromeURLDataManager::GetInstance(), + &ChromeURLDataManager::AddDataSource, + make_scoped_refptr(html_source))); } |