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

Unified Diff: chrome/common/jstemplate_builder.h

Issue 10141005: switch ntp to jstemplate v2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test once and for all 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 | « chrome/common/common_resources.grd ('k') | chrome/common/jstemplate_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/jstemplate_builder.h
diff --git a/chrome/common/jstemplate_builder.h b/chrome/common/jstemplate_builder.h
index 7ef6338c980d3c75cae04f0048582b717fcb49ef..e9253493a7e5e20d462755ad247447e0b29915a8 100644
--- a/chrome/common/jstemplate_builder.h
+++ b/chrome/common/jstemplate_builder.h
@@ -24,6 +24,20 @@ class DictionaryValue;
namespace jstemplate_builder {
+// While an object of this class is in scope, the template builder will output
+// version 2 html. Version 2 uses load_time_data.js and i18n_template2.js, and
+// should soon become the default.
+class UseVersion2 {
+ public:
+ UseVersion2();
+ ~UseVersion2();
+
+ private:
+ bool previous_value_;
+
+ DISALLOW_COPY_AND_ASSIGN(UseVersion2);
+};
+
// A helper function that generates a string of HTML to be loaded. The
// string includes the HTML and the javascript code necessary to generate the
// full page with support for JsTemplates.
@@ -54,9 +68,6 @@ void AppendJsonHtml(const base::DictionaryValue* json, std::string* output);
// Same as AppendJsonHtml(), except does not include the <script></script>
// tag wrappers.
void AppendJsonJS(const base::DictionaryValue* json, std::string* output);
-// Same as above, but uses a slightly different format which should some day
-// become the default.
-void AppendJsonJS2(const base::DictionaryValue* json, std::string* output);
// Appends the source for JsTemplates in a script tag.
void AppendJsTemplateSourceHtml(std::string* output);
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/jstemplate_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698