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

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index a61499db89d9f23ac1776fa3ec30ca29aa844c1f..64cf6fd34458cf0d71e8243bf8822014581c2da5 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -640,11 +640,11 @@ CacheControlHeader parseCacheControlDirectives(const AtomicString& cacheControlV
cacheControlHeader.maxAge = std::numeric_limits<double>::quiet_NaN();
cacheControlHeader.staleWhileRevalidate = std::numeric_limits<double>::quiet_NaN();
- DEFINE_STATIC_LOCAL(const AtomicString, noCacheDirective, ("no-cache", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, noStoreDirective, ("no-store", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, mustRevalidateDirective, ("must-revalidate", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, maxAgeDirective, ("max-age", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, staleWhileRevalidateDirective, ("stale-while-revalidate", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, noCacheDirective, ("no-cache"));
+ DEFINE_STATIC_LOCAL(const AtomicString, noStoreDirective, ("no-store"));
+ DEFINE_STATIC_LOCAL(const AtomicString, mustRevalidateDirective, ("must-revalidate"));
+ DEFINE_STATIC_LOCAL(const AtomicString, maxAgeDirective, ("max-age"));
+ DEFINE_STATIC_LOCAL(const AtomicString, staleWhileRevalidateDirective, ("stale-while-revalidate"));
if (!cacheControlValue.isEmpty()) {
Vector<std::pair<String, String>> directives;

Powered by Google App Engine
This is Rietveld 408576698