summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/new_tab_ui.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 18:41:13 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-25 18:41:13 +0000
commitcbb79de5eaddb45e519332e09d6826d53448d54e (patch)
treecf94ca25162b770c9dc2220a7f979bc2167eef13 /chrome/browser/dom_ui/new_tab_ui.cc
parentd043c2cccc2705908f2a3d39d404c8bf1a51c0de (diff)
downloadchromium_src-cbb79de5eaddb45e519332e09d6826d53448d54e.zip
chromium_src-cbb79de5eaddb45e519332e09d6826d53448d54e.tar.gz
chromium_src-cbb79de5eaddb45e519332e09d6826d53448d54e.tar.bz2
Reverting 12469.
Review URL: http://codereview.chromium.org/53062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.cc')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc34
1 files changed, 14 insertions, 20 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 8318f15..199e5db 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -382,19 +382,16 @@ MostVisitedHandler::MostVisitedHandler(DOMUI* dom_ui)
dom_ui_->RegisterMessageCallback("getMostVisited",
NewCallback(this, &MostVisitedHandler::HandleGetMostVisited));
- // Set up our sources for thumbnail and favicon data. Since we may be in
- // testing mode with no I/O thread, only add our handler when an I/O thread
- // exists. Ownership is passed to the ChromeURLDataManager.
- if (g_browser_process->io_thread()) {
- g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(&chrome_url_data_manager,
- &ChromeURLDataManager::AddDataSource,
- new DOMUIThumbnailSource(dom_ui->GetProfile())));
- g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(&chrome_url_data_manager,
- &ChromeURLDataManager::AddDataSource,
- new DOMUIFavIconSource(dom_ui->GetProfile())));
- }
+ // Set up our sources for thumbnail and favicon data.
+ // Ownership is passed to the ChromeURLDataManager.
+ g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(&chrome_url_data_manager,
+ &ChromeURLDataManager::AddDataSource,
+ new DOMUIThumbnailSource(dom_ui->GetProfile())));
+ g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(&chrome_url_data_manager,
+ &ChromeURLDataManager::AddDataSource,
+ new DOMUIFavIconSource(dom_ui->GetProfile())));
// Get notifications when history is cleared.
NotificationService* service = NotificationService::current();
@@ -1055,12 +1052,9 @@ NewTabUI::NewTabUI(WebContents* contents)
NewTabHTMLSource* html_source = new NewTabHTMLSource();
- // In testing mode there may not be an I/O thread.
- if (g_browser_process->io_thread()) {
- g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(&chrome_url_data_manager,
- &ChromeURLDataManager::AddDataSource,
- html_source));
- }
+ g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(&chrome_url_data_manager,
+ &ChromeURLDataManager::AddDataSource,
+ html_source));
}
}