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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchUtils.cpp

Issue 2142513003: Use initializer_lists for static WTF::HashSets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/core/fetch/FetchUtils.cpp
diff --git a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
index ef2c884821d9b276feb12e499f5096e078da806e..d1996855a3e43363a44a02204c8fb10bd8a52d38 100644
--- a/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
+++ b/third_party/WebKit/Source/core/fetch/FetchUtils.cpp
@@ -45,27 +45,29 @@ ForbiddenHeaderNames::ForbiddenHeaderNames()
: m_proxyHeaderPrefix("proxy-")
, m_secHeaderPrefix("sec-")
{
- m_fixedNames.add("accept-charset");
- m_fixedNames.add("accept-encoding");
- m_fixedNames.add("access-control-request-headers");
- m_fixedNames.add("access-control-request-method");
- m_fixedNames.add("connection");
- m_fixedNames.add("content-length");
- m_fixedNames.add("cookie");
- m_fixedNames.add("cookie2");
- m_fixedNames.add("date");
- m_fixedNames.add("dnt");
- m_fixedNames.add("expect");
- m_fixedNames.add("host");
- m_fixedNames.add("keep-alive");
- m_fixedNames.add("origin");
- m_fixedNames.add("referer");
- m_fixedNames.add("te");
- m_fixedNames.add("trailer");
- m_fixedNames.add("transfer-encoding");
- m_fixedNames.add("upgrade");
- m_fixedNames.add("user-agent");
- m_fixedNames.add("via");
+ m_fixedNames = {
+ "accept-charset",
+ "accept-encoding",
+ "access-control-request-headers",
+ "access-control-request-method",
+ "connection",
+ "content-length",
+ "cookie",
+ "cookie2",
+ "date",
+ "dnt",
+ "expect",
+ "host",
+ "keep-alive",
+ "origin",
+ "referer",
+ "te",
+ "trailer",
+ "transfer-encoding",
+ "upgrade",
+ "user-agent",
+ "via",
+ };
}
const ForbiddenHeaderNames& ForbiddenHeaderNames::get()

Powered by Google App Engine
This is Rietveld 408576698