Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc |
=================================================================== |
--- chrome/browser/ui/webui/ntp/new_tab_ui.cc (revision 176942) |
+++ chrome/browser/ui/webui/ntp/new_tab_ui.cc (working copy) |
@@ -26,7 +26,6 @@ |
#include "chrome/browser/themes/theme_service.h" |
#include "chrome/browser/themes/theme_service_factory.h" |
#include "chrome/browser/ui/browser.h" |
-#include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
#include "chrome/browser/ui/webui/metrics_handler.h" |
#include "chrome/browser/ui/webui/ntp/favicon_webui_handler.h" |
#include "chrome/browser/ui/webui/ntp/foreign_session_handler.h" |
@@ -369,9 +368,10 @@ |
return chrome::kChromeUINewTabHost; |
} |
-void NewTabUI::NewTabHTMLSource::StartDataRequest(const std::string& path, |
- bool is_incognito, |
- int request_id) { |
+void NewTabUI::NewTabHTMLSource::StartDataRequest( |
+ const std::string& path, |
+ bool is_incognito, |
+ const content::URLDataSource::GotDataCallback& callback) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
std::map<std::string, std::pair<std::string, int> >::iterator it = |
@@ -382,7 +382,7 @@ |
ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
it->second.second) : |
new base::RefCountedStaticMemory); |
- url_data_source()->SendResponse(request_id, resource_bytes); |
+ callback.Run(resource_bytes); |
return; |
} |
@@ -404,7 +404,7 @@ |
NTPResourceCacheFactory::GetForProfile(profile_)-> |
GetNewTabHTML(is_incognito)); |
- url_data_source()->SendResponse(request_id, html_bytes); |
+ callback.Run(html_bytes); |
} |
std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string& resource) |