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

Unified Diff: chrome/browser/dom_ui/history_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/filebrowse_ui.cc ('k') | chrome/browser/dom_ui/most_visited_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/history_ui.cc
diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc
index 5e78bbebfd3e75592030906cb5923ee13dcb0c50..e852ee9d2d93e09d7a6dd8c35bddc38cbeab37be 100644
--- a/chrome/browser/dom_ui/history_ui.cc
+++ b/chrome/browser/dom_ui/history_ui.cc
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/i18n/time_formatting.h"
#include "base/message_loop.h"
+#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/thread.h"
@@ -113,7 +114,7 @@ DOMMessageHandler* BrowsingHistoryHandler::Attach(DOMUI* dom_ui) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- &chrome_url_data_manager,
+ Singleton<ChromeURLDataManager>().get(),
&ChromeURLDataManager::AddDataSource,
new DOMUIFavIconSource(dom_ui->GetProfile())));
@@ -373,7 +374,7 @@ HistoryUI::HistoryUI(TabContents* contents) : DOMUI(contents) {
ChromeThread::PostTask(
ChromeThread::IO, FROM_HERE,
NewRunnableMethod(
- &chrome_url_data_manager,
+ Singleton<ChromeURLDataManager>().get(),
&ChromeURLDataManager::AddDataSource,
html_source));
}
« no previous file with comments | « chrome/browser/dom_ui/filebrowse_ui.cc ('k') | chrome/browser/dom_ui/most_visited_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698