Chromium Code Reviews| Index: chrome/browser/ui/webui/chromeos/register_page_ui.cc |
| =================================================================== |
| --- chrome/browser/ui/webui/chromeos/register_page_ui.cc (revision 176443) |
| +++ chrome/browser/ui/webui/chromeos/register_page_ui.cc (working copy) |
| @@ -27,6 +27,7 @@ |
| #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| #include "chrome/common/cancelable_task_tracker.h" |
| #include "chrome/common/url_constants.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" |
| @@ -95,12 +96,12 @@ |
| } // namespace |
| -class RegisterPageUIHTMLSource : public ChromeURLDataManager::DataSource { |
| +class RegisterPageUIHTMLSource : public content::URLDataSourceDelegate { |
| public: |
| RegisterPageUIHTMLSource(); |
| - // Called when the network layer has requested a resource underneath |
| - // the path we registered. |
| + // content::URLDataSourceDelegate implementation: |
|
James Hawkins
2013/01/14 18:53:54
nit: Period at the end.
|
| + virtual std::string GetSource() OVERRIDE; |
| virtual void StartDataRequest(const std::string& path, |
| bool is_incognito, |
| int request_id); |
| @@ -155,10 +156,13 @@ |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
| -RegisterPageUIHTMLSource::RegisterPageUIHTMLSource() |
| - : DataSource(chrome::kChromeUIRegisterPageHost, MessageLoop::current()) { |
| +RegisterPageUIHTMLSource::RegisterPageUIHTMLSource() { |
| } |
| +std::string RegisterPageUIHTMLSource::GetSource() { |
| + return chrome::kChromeUIRegisterPageHost; |
| +} |
| + |
| void RegisterPageUIHTMLSource::StartDataRequest(const std::string& path, |
| bool is_incognito, |
| int request_id) { |
| @@ -167,7 +171,7 @@ |
| if (!chromeos::WizardController::default_controller() || |
| chromeos::WizardController::IsDeviceRegistered()) { |
| scoped_refptr<base::RefCountedBytes> empty_bytes(new base::RefCountedBytes); |
| - SendResponse(request_id, empty_bytes); |
| + url_data_source()->SendResponse(request_id, empty_bytes); |
| return; |
| } |
| @@ -175,7 +179,7 @@ |
| ResourceBundle::GetSharedInstance().LoadDataResourceBytes( |
| IDR_HOST_REGISTRATION_PAGE_HTML)); |
| - SendResponse(request_id, html_bytes); |
| + url_data_source()->SendResponse(request_id, html_bytes); |
| } |
| //////////////////////////////////////////////////////////////////////////////// |