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

Unified Diff: chrome/common/jstemplate_builder.cc

Issue 10252019: fix ntp/file: pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/jstemplate_builder.cc
diff --git a/chrome/common/jstemplate_builder.cc b/chrome/common/jstemplate_builder.cc
index de66ccebcb49fc51900aea20665491fa2315a744..eb956743929214cb1cec72a5e9169f7e5e736f4e 100644
--- a/chrome/common/jstemplate_builder.cc
+++ b/chrome/common/jstemplate_builder.cc
@@ -117,15 +117,20 @@ void AppendI18nTemplateSourceHtml(std::string* output) {
// fetch and cache the pointer of the jstemplate resource source text.
static const base::StringPiece i18n_template_src(
ResourceBundle::GetSharedInstance().GetRawDataResource(
- g_version2 ? IDR_I18N_TEMPLATE2_JS : IDR_I18N_TEMPLATE_JS));
+ IDR_I18N_TEMPLATE_JS));
+ static const base::StringPiece i18n_template2_src(
+ ResourceBundle::GetSharedInstance().GetRawDataResource(
+ IDR_I18N_TEMPLATE2_JS));
+ const base::StringPiece* template_src = g_version2 ?
+ &i18n_template2_src : &i18n_template_src;
- if (i18n_template_src.empty()) {
+ if (template_src->empty()) {
NOTREACHED() << "Unable to get i18n template src";
return;
}
output->append("<script>");
- output->append(i18n_template_src.data(), i18n_template_src.size());
+ output->append(template_src->data(), template_src->size());
output->append("</script>");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698