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

Unified Diff: chrome/browser/ui/webui/bookmarks_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/bookmarks_ui.cc
===================================================================
--- chrome/browser/ui/webui/bookmarks_ui.cc (revision 176443)
+++ chrome/browser/ui/webui/bookmarks_ui.cc (working copy)
@@ -19,17 +19,20 @@
//
////////////////////////////////////////////////////////////////////////////////
-BookmarksUIHTMLSource::BookmarksUIHTMLSource()
- : DataSource(chrome::kChromeUIBookmarksHost, MessageLoop::current()) {
+BookmarksUIHTMLSource::BookmarksUIHTMLSource() {
}
+std::string BookmarksUIHTMLSource::GetSource() {
+ return chrome::kChromeUIBookmarksHost;
+}
+
void BookmarksUIHTMLSource::StartDataRequest(const std::string& path,
bool is_incognito,
int request_id) {
NOTREACHED() << "We should never get here since the extension should have"
<< "been triggered";
- SendResponse(request_id, NULL);
+ url_data_source()->SendResponse(request_id, NULL);
}
std::string BookmarksUIHTMLSource::GetMimeType(const std::string& path) const {
@@ -48,10 +51,12 @@
BookmarksUI::BookmarksUI(content::WebUI* web_ui) : WebUIController(web_ui) {
BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource();
-
// Set up the chrome://bookmarks/ source.
Profile* profile = Profile::FromWebUI(web_ui);
ChromeURLDataManager::AddDataSource(profile, html_source);
+ ChromeURLDataManager::AddDataSource(
+ Profile::FromWebUI(web_ui),
+ new BookmarksUIHTMLSource);
}
tfarina 2013/01/14 20:49:11 wait, something is crazy going on here. Isn't:
jam 2013/01/14 20:52:07 ah, thanks. i had changed it while doing another c
// static

Powered by Google App Engine
This is Rietveld 408576698