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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl

Issue 2445123002: Make blink settings/features case-sensitive (Closed)
Patch Set: case-sensitive Created 4 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
Index: third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl
index 394fafe4377b4266797befb255bf4f17c6ca93c7..2c9abf10950cb8dbbcd21d05034b7766ba701309 100644
--- a/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl
@@ -6,21 +6,6 @@
#include "wtf/Assertions.h"
#include "wtf/text/WTFString.h"
-namespace {
-
-bool caseInsensitiveEqual(const std::string& a, const std::string& b)
-{
- if (a.size() != b.size())
- return false;
- for (size_t i = 0; i < a.size(); ++i) {
- if (tolower(a[i]) != tolower(b[i]))
- return false;
- }
- return true;
-}
-
-} // namespace
-
namespace blink {
RuntimeEnabledFeatures::Backup::Backup()
@@ -51,7 +36,7 @@ void RuntimeEnabledFeatures::set{{feature_set|capitalize}}FeaturesEnabled(bool e
void RuntimeEnabledFeatures::setFeatureEnabledFromString(const std::string& name, bool isEnabled)
{
{% for feature in standard_features %}
- if (caseInsensitiveEqual(name, "{{feature.name}}")) {
+ if (name == "{{feature.name}}") {
set{{feature.name}}Enabled(isEnabled);
return;
}

Powered by Google App Engine
This is Rietveld 408576698