Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Unified Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 350007: Convert chrome_url_data_manager (previously a global) into a Singleton. This (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_ui/most_visited_handler.cc ('k') | chrome/browser/dom_ui/print_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 02594fe956b9ec151b13ace7e153de36e29d1787..d6aad599f26f2a7b74a728226907f5f1102f2378 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -15,6 +15,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/histogram.h"
+#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/thread.h"
#include "chrome/browser/browser.h"
@@ -552,7 +553,7 @@ NewTabUI::NewTabUI(TabContents* contents)
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- &chrome_url_data_manager,
+ Singleton<ChromeURLDataManager>().get(),
&ChromeURLDataManager::AddDataSource,
html_source));
} else {
@@ -575,7 +576,7 @@ NewTabUI::NewTabUI(TabContents* contents)
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- &chrome_url_data_manager,
+ Singleton<ChromeURLDataManager>().get(),
&ChromeURLDataManager::AddDataSource,
html_source));
if (!posted) {
@@ -622,7 +623,7 @@ void NewTabUI::InitializeCSSCaches() {
bool posted = ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- &chrome_url_data_manager,
+ Singleton<ChromeURLDataManager>().get(),
&ChromeURLDataManager::AddDataSource,
theme));
if (!posted) {
« no previous file with comments | « chrome/browser/dom_ui/most_visited_handler.cc ('k') | chrome/browser/dom_ui/print_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698