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

Unified Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 11881055: Simplify WebUI data sources. Currently WebUI data sources implement a URLDataSourceDelegate interfa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix issue in about_ui exposed by cros tests 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/feedback_ui.cc
===================================================================
--- chrome/browser/ui/webui/feedback_ui.cc (revision 176942)
+++ chrome/browser/ui/webui/feedback_ui.cc (working copy)
@@ -385,11 +385,8 @@
void FeedbackHandler::SetupScreenshotsSource() {
Profile* profile = Profile::FromBrowserContext(tab_->GetBrowserContext());
- // If we don't already have a screenshot source object created, create one.
- if (!screenshot_source_) {
- screenshot_source_ =
- new ScreenshotSource(FeedbackUtil::GetScreenshotPng(), profile);
- }
+ screenshot_source_ =
+ new ScreenshotSource(FeedbackUtil::GetScreenshotPng(), profile);
// Add the source to the data manager.
ChromeURLDataManager::AddDataSource(profile, screenshot_source_);
}
@@ -475,8 +472,6 @@
}
void FeedbackHandler::RegisterMessages() {
- SetupScreenshotsSource();
-
web_ui()->RegisterMessageCallback("getDialogDefaults",
base::Bind(&FeedbackHandler::HandleGetDialogDefaults,
base::Unretained(this)));
@@ -730,7 +725,7 @@
// Set up the chrome://feedback/ source.
Profile* profile = Profile::FromWebUI(web_ui);
- ChromeURLDataManager::AddDataSource(profile, html_source);
+ ChromeURLDataManager::AddDataSourceImpl(profile, html_source);
}
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698