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

Unified Diff: chrome/browser/ui/webui/profiler_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/profiler_ui.cc
===================================================================
--- chrome/browser/ui/webui/profiler_ui.cc (revision 176443)
+++ chrome/browser/ui/webui/profiler_ui.cc (working copy)
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/url_data_source_delegate.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_message_handler.h"
@@ -46,14 +47,17 @@
#ifdef USE_SOURCE_FILES_DIRECTLY
-class ProfilerWebUIDataSource : public ChromeURLDataManager::DataSource {
+class ProfilerWebUIDataSource : public content::URLDataSourceDelegate {
public:
- ProfilerWebUIDataSource()
- : DataSource(chrome::kChromeUIProfilerHost, MessageLoop::current()) {
+ ProfilerWebUIDataSource() {
}
protected:
- // ChromeURLDataManager
+ // content::URLDataSourceDelegate implementation.
+ virtual std::string GetSource() OVERRIDE {
+ return chrome::kChromeUIProfilerHost;
+ }
+
virtual std::string GetMimeType(const std::string& path) const OVERRIDE {
if (EndsWith(path, ".js", false))
return "application/javascript";
@@ -84,7 +88,7 @@
scoped_refptr<base::RefCountedString> response =
new base::RefCountedString();
response->data() = file_contents;
- SendResponse(request_id, response);
+ url_data_source()->SendResponse(request_id, response);
}
private:

Powered by Google App Engine
This is Rietveld 408576698