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

Unified Diff: chrome/browser/dom_ui/filebrowse_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/downloads_ui.cc ('k') | chrome/browser/dom_ui/history_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/filebrowse_ui.cc
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index bcd0aff737ac9bb0138430ad90a6a585fe234e5b..a399aa5509b76b90715de3968558c98f1c60c07b 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/logging.h"
#include "base/message_loop.h"
+#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/thread.h"
@@ -136,7 +137,7 @@ DOMMessageHandler* FileBrowseHandler::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())));
@@ -253,7 +254,7 @@ FileBrowseUI::FileBrowseUI(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/downloads_ui.cc ('k') | chrome/browser/dom_ui/history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698