namespace {
-content::WebUIDataSource* CreateComponentsUIHTMLSource() {
+content::WebUIDataSource* CreateComponentsUIHTMLSource(Profile* profile) {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIComponentsHost);
source->SetUseJsonJSFormatV2();
source->AddResourcePath("components.js", IDR_COMPONENTS_JS);
source->SetDefaultResource(IDR_COMPONENTS_HTML);
#if defined(OS_CHROMEOS)
- chromeos::AddAccountUITweaksLocalizedValues(source);
+ chromeos::AddAccountUITweaksLocalizedValues(source, profile);
#endif
return source;
}
// Set up the chrome://components/ source.
Profile* profile = Profile::FromWebUI(web_ui);
- content::WebUIDataSource::Add(profile, CreateComponentsUIHTMLSource());
+ content::WebUIDataSource::Add(profile, CreateComponentsUIHTMLSource(profile));
}
// static