Chromium Code Reviews| Index: chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc |
| diff --git a/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc b/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc |
| index fe57d4cdaf34463483bf92bb2fb9f9bfb84b0803..aecb5c512e1317b91adc5afaabb8a4ab0d32ad3c 100644 |
| --- a/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc |
| +++ b/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc |
| @@ -5,6 +5,7 @@ |
| #include "chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/ui/webui/cleanup_tool/cleanup_action_handler.h" |
| #include "chrome/common/url_constants.h" |
| #include "chrome/grit/browser_resources.h" |
| #include "content/public/browser/web_ui_data_source.h" |
| @@ -14,8 +15,22 @@ CleanupToolUI::CleanupToolUI(content::WebUI* web_ui) |
| content::WebUIDataSource* html_source = |
| content::WebUIDataSource::Create(chrome::kChromeUICleanupToolHost); |
| + // TODO(proberge): Localize strings once they are finalized. |
| + html_source->AddString("title", "Chrome Cleanup"); |
| + html_source->AddString("sectionHeader", |
| + "Remove suspicious or unwanted programs"); |
| + html_source->AddString("scanAction", "SCAN NOW"); |
| + html_source->AddString("scanning", "SCANNING"); |
| + html_source->AddString("cleanAction", "RUN CHROME CLEANUP"); |
|
Dan Beam
2017/04/04 00:00:01
i know these are dummies, but in general the strin
proberge
2017/04/04 16:10:10
Done.
|
| + html_source->AddString("about", "About Chrome Cleanup"); |
| + html_source->SetJsonPath("strings.js"); |
| + |
| + html_source->AddResourcePath("toolbar.html", IDR_CLEANUP_TOOL_TOOLBAR_HTML); |
| + html_source->AddResourcePath("toolbar.js", IDR_CLEANUP_TOOL_TOOLBAR_JS); |
| html_source->SetDefaultResource(IDR_CLEANUP_TOOL_HTML); |
| Profile* profile = Profile::FromWebUI(web_ui); |
| content::WebUIDataSource::Add(profile, html_source); |
| + |
| + web_ui->AddMessageHandler(base::MakeUnique<CleanupActionHandler>()); |
| } |