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

Unified Diff: chrome/common/jstemplate_builder.cc

Issue 10269008: fix jstemplate_builder::UseVersion2 (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 | « chrome/common/jstemplate_builder.h ('k') | 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 eb956743929214cb1cec72a5e9169f7e5e736f4e..9d0d46b5db0a5299113dfd9e68963dc5d909e39e 100644
--- a/chrome/common/jstemplate_builder.cc
+++ b/chrome/common/jstemplate_builder.cc
@@ -16,19 +16,19 @@
namespace {
-// True when building version 2 templates. See UseVersion2 class.
-bool g_version2 = false;
+// Non-zero when building version 2 templates. See UseVersion2 class.
+int g_version2 = 0;
} // namespace
namespace jstemplate_builder {
-UseVersion2::UseVersion2() : previous_value_(g_version2) {
- g_version2 = true;
+UseVersion2::UseVersion2() {
+ g_version2++;
}
UseVersion2::~UseVersion2() {
- g_version2 = previous_value_;
+ g_version2--;
}
std::string GetTemplateHtml(const base::StringPiece& html_template,
« no previous file with comments | « chrome/common/jstemplate_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698