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

Unified Diff: ui/base/webui/jstemplate_builder.cc

Issue 639823008: Include load_time_data.js automatically with GetI18nTemplateHtml (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comment Created 6 years, 2 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
« no previous file with comments | « chrome/browser/resources/supervised_user_block_interstitial.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/webui/jstemplate_builder.cc
diff --git a/ui/base/webui/jstemplate_builder.cc b/ui/base/webui/jstemplate_builder.cc
index 4c895658872a0a54c2333c3c8a6d630b3ae90d39..413468fad8c06faa13fa2dd80031d98ade4628d0 100644
--- a/ui/base/webui/jstemplate_builder.cc
+++ b/ui/base/webui/jstemplate_builder.cc
@@ -34,7 +34,7 @@ void AppendJsonHtml(const base::DictionaryValue* json, std::string* output) {
output->append("</script>");
}
-// Appends the source for JsTemplates in a script tag.
+// Appends the source for load_time_data.js in a script tag.
void AppendLoadTimeData(std::string* output) {
// fetch and cache the pointer of the jstemplate resource source text.
base::StringPiece load_time_data_src(
@@ -102,6 +102,7 @@ void AppendI18nTemplateSourceHtml(std::string* output) {
std::string GetI18nTemplateHtml(const base::StringPiece& html_template,
const base::DictionaryValue* json) {
std::string output(html_template.data(), html_template.size());
+ AppendLoadTimeData(&output);
AppendJsonHtml(json, &output);
AppendI18nTemplateSourceHtml(&output);
return output;
« no previous file with comments | « chrome/browser/resources/supervised_user_block_interstitial.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698