| Index: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc (revision 176942)
|
| +++ chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc (working copy)
|
| @@ -11,12 +11,12 @@
|
| #include "chrome/browser/chromeos/proxy_config_service_impl.h"
|
| #include "chrome/browser/chromeos/settings/cros_settings.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
|
| #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h"
|
| #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h"
|
| +#include "chrome/browser/ui/webui/web_ui_util.h"
|
| #include "chrome/common/jstemplate_builder.h"
|
| #include "chrome/common/url_constants.h"
|
| -#include "content/public/browser/url_data_source_delegate.h"
|
| +#include "content/public/browser/url_data_source.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_ui.h"
|
| #include "content/public/browser/web_ui_message_handler.h"
|
| @@ -28,15 +28,16 @@
|
|
|
| namespace {
|
|
|
| -class ProxySettingsHTMLSource : public content::URLDataSourceDelegate {
|
| +class ProxySettingsHTMLSource : public content::URLDataSource {
|
| public:
|
| explicit ProxySettingsHTMLSource(DictionaryValue* localized_strings);
|
|
|
| - // content::URLDataSourceDelegate implementation.
|
| + // content::URLDataSource implementation.
|
| virtual std::string GetSource() OVERRIDE;
|
| - virtual void StartDataRequest(const std::string& path,
|
| - bool is_incognito,
|
| - int request_id) OVERRIDE;
|
| + virtual void StartDataRequest(
|
| + const std::string& path,
|
| + bool is_incognito,
|
| + const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
|
| virtual std::string GetMimeType(const std::string&) const OVERRIDE {
|
| return "text/html";
|
| }
|
| @@ -59,10 +60,11 @@
|
| return chrome::kChromeUIProxySettingsHost;
|
| }
|
|
|
| -void ProxySettingsHTMLSource::StartDataRequest(const std::string& path,
|
| - bool is_incognito,
|
| - int request_id) {
|
| - URLDataSource::SetFontAndTextDirection(localized_strings_.get());
|
| +void ProxySettingsHTMLSource::StartDataRequest(
|
| + const std::string& path,
|
| + bool is_incognito,
|
| + const content::URLDataSource::GotDataCallback& callback) {
|
| + web_ui_util::SetFontAndTextDirection(localized_strings_.get());
|
|
|
| static const base::StringPiece html(
|
| ResourceBundle::GetSharedInstance().GetRawDataResource(
|
| @@ -70,8 +72,7 @@
|
| std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
|
| html, localized_strings_.get());
|
|
|
| - url_data_source()->SendResponse(
|
| - request_id, base::RefCountedString::TakeString(&full_html));
|
| + callback.Run(base::RefCountedString::TakeString(&full_html));
|
| }
|
|
|
| } // namespace
|
|
|