summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 01:41:09 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 01:41:09 +0000
commit576a4ca9a1bfbcb6e255e9842db1ac3da62f8496 (patch)
treef65375fc4d66779d4084d013f678acfabb07e304 /chrome
parentc18f236f8df52c2724612fc01170a9f6e2c8fd7d (diff)
downloadchromium_src-576a4ca9a1bfbcb6e255e9842db1ac3da62f8496.zip
chromium_src-576a4ca9a1bfbcb6e255e9842db1ac3da62f8496.tar.gz
chromium_src-576a4ca9a1bfbcb6e255e9842db1ac3da62f8496.tar.bz2
Coverity: Fix unnecessary Singleton object instantiation.
CID=7228-7241 BUG=none TEST=none Review URL: http://codereview.chromium.org/360037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chrome_dll_main.cc4
-rw-r--r--chrome/browser/browser_about_handler.cc2
-rw-r--r--chrome/browser/dom_ui/chrome_url_data_manager.cc2
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.cc2
-rw-r--r--chrome/browser/dom_ui/downloads_ui.cc2
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc4
-rw-r--r--chrome/browser/dom_ui/history_ui.cc4
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.cc4
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc6
-rw-r--r--chrome/browser/dom_ui/print_ui.cc2
-rw-r--r--chrome/browser/extensions/extensions_ui.cc2
-rw-r--r--chrome/browser/sync/sync_setup_wizard.cc2
-rw-r--r--chrome/test/in_process_browser_test.cc4
13 files changed, 20 insertions, 20 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 22e95d2..26b493a 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -600,9 +600,9 @@ int ChromeMain(int argc, char** argv) {
sandbox_cmd = sandbox_binary;
// Tickle the sandbox host and zygote host so they fork now.
- RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>().get();
+ RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>::get();
shost->Init(sandbox_cmd);
- ZygoteHost* zhost = Singleton<ZygoteHost>().get();
+ ZygoteHost* zhost = Singleton<ZygoteHost>::get();
zhost->Init(sandbox_cmd);
// We want to be sure to init NSPR on the main thread.
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index c478945..21b166e 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -571,7 +571,7 @@ AboutSource::AboutSource()
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource, this));
}
diff --git a/chrome/browser/dom_ui/chrome_url_data_manager.cc b/chrome/browser/dom_ui/chrome_url_data_manager.cc
index 3da06c1..b6cba21 100644
--- a/chrome/browser/dom_ui/chrome_url_data_manager.cc
+++ b/chrome/browser/dom_ui/chrome_url_data_manager.cc
@@ -275,7 +275,7 @@ void ChromeURLDataManager::DataSource::SendResponse(
RefCountedMemory* bytes) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::DataAvailable,
request_id, scoped_refptr<RefCountedMemory>(bytes)));
}
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.cc b/chrome/browser/dom_ui/downloads_dom_handler.cc
index d11719f..028b21a 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.cc
+++ b/chrome/browser/dom_ui/downloads_dom_handler.cc
@@ -49,7 +49,7 @@ DownloadsDOMHandler::DownloadsDOMHandler(DownloadManager* dlm)
// Create our fileicon data source.
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
new FileIconSource()));
}
diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc
index d01120d..39adf47e 100644
--- a/chrome/browser/dom_ui/downloads_ui.cc
+++ b/chrome/browser/dom_ui/downloads_ui.cc
@@ -127,7 +127,7 @@ DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) {
// Set up the chrome://downloads/ source.
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index a399aa5..0a07074 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -137,7 +137,7 @@ DOMMessageHandler* FileBrowseHandler::Attach(DOMUI* dom_ui) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
new DOMUIFavIconSource(dom_ui->GetProfile())));
@@ -254,7 +254,7 @@ FileBrowseUI::FileBrowseUI(TabContents* contents) : DOMUI(contents) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 8d517f9..c998230 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -114,7 +114,7 @@ DOMMessageHandler* BrowsingHistoryHandler::Attach(DOMUI* dom_ui) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
new DOMUIFavIconSource(dom_ui->GetProfile())));
@@ -369,7 +369,7 @@ HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc
index a0e52bc..7dc5569 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -61,7 +61,7 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) {
new DOMUIThumbnailSource(dom_ui->GetProfile());
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource, thumbnail_src));
if (!posted) {
thumbnail_src->AddRef();
@@ -71,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(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource, favicon_src));
if (!posted) {
favicon_src->AddRef();
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index d6aad59..10addde 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -553,7 +553,7 @@ NewTabUI::NewTabUI(TabContents* contents)
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
} else {
@@ -576,7 +576,7 @@ NewTabUI::NewTabUI(TabContents* contents)
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
if (!posted) {
@@ -623,7 +623,7 @@ void NewTabUI::InitializeCSSCaches() {
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
theme));
if (!posted) {
diff --git a/chrome/browser/dom_ui/print_ui.cc b/chrome/browser/dom_ui/print_ui.cc
index 4abc592..bbdd3eb 100644
--- a/chrome/browser/dom_ui/print_ui.cc
+++ b/chrome/browser/dom_ui/print_ui.cc
@@ -30,7 +30,7 @@ PrintUI::PrintUI(TabContents* contents) : DOMUI(contents) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index e4ef3cf..758f70d 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -568,7 +568,7 @@ ExtensionsUI::ExtensionsUI(TabContents* contents) : DOMUI(contents) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- Singleton<ChromeURLDataManager>().get(),
+ Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc
index 2e4664d..645c931 100644
--- a/chrome/browser/sync/sync_setup_wizard.cc
+++ b/chrome/browser/sync/sync_setup_wizard.cc
@@ -141,7 +141,7 @@ SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service)
SyncResourcesSource* sync_source = new SyncResourcesSource();
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
- NewRunnableMethod(Singleton<ChromeURLDataManager>().get(),
+ NewRunnableMethod(Singleton<ChromeURLDataManager>::get(),
&ChromeURLDataManager::AddDataSource,
sync_source));
if (!posted) {
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index df3021c..3205046 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -45,9 +45,9 @@ namespace {
class LinuxHostInit {
public:
LinuxHostInit() {
- RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>().get();
+ RenderSandboxHostLinux* shost = Singleton<RenderSandboxHostLinux>::get();
shost->Init("");
- ZygoteHost* zhost = Singleton<ZygoteHost>().get();
+ ZygoteHost* zhost = Singleton<ZygoteHost>::get();
zhost->Init("");
}
~LinuxHostInit() {}