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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 11885021: Don't derive from ChromeURLDataManager::DataSource, and instead have these classes implement a dele… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 7 years, 11 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
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
===================================================================
--- chrome/browser/ui/webui/ntp/new_tab_ui.cc (revision 176443)
+++ chrome/browser/ui/webui/ntp/new_tab_ui.cc (working copy)
@@ -362,10 +362,13 @@
// NewTabHTMLSource
NewTabUI::NewTabHTMLSource::NewTabHTMLSource(Profile* profile)
- : DataSource(chrome::kChromeUINewTabHost, MessageLoop::current()),
- profile_(profile) {
+ : profile_(profile) {
}
+std::string NewTabUI::NewTabHTMLSource::GetSource() {
+ return chrome::kChromeUINewTabHost;
+}
+
void NewTabUI::NewTabHTMLSource::StartDataRequest(const std::string& path,
bool is_incognito,
int request_id) {
@@ -379,7 +382,7 @@
ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
it->second.second) :
new base::RefCountedStaticMemory);
- SendResponse(request_id, resource_bytes);
+ url_data_source()->SendResponse(request_id, resource_bytes);
return;
}
@@ -401,7 +404,7 @@
NTPResourceCacheFactory::GetForProfile(profile_)->
GetNewTabHTML(is_incognito));
- SendResponse(request_id, html_bytes);
+ url_data_source()->SendResponse(request_id, html_bytes);
}
std::string NewTabUI::NewTabHTMLSource::GetMimeType(const std::string& resource)

Powered by Google App Engine
This is Rietveld 408576698