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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.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/modules/presentation/PresentationConnection.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index 9c1ee108543ccd58d1d60846d85f114b00c67342..44d0d280a26a8485bba3652745d7e619e5c37eb0 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -45,9 +45,9 @@ WebPresentationClient* presentationClient(ExecutionContext* executionContext)
const AtomicString& connectionStateToString(WebPresentationConnectionState state)
{
- DEFINE_STATIC_LOCAL(const AtomicString, connectedValue, ("connected", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, closedValue, ("closed", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, terminatedValue, ("terminated", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, connectedValue, ("connected"));
+ DEFINE_STATIC_LOCAL(const AtomicString, closedValue, ("closed"));
+ DEFINE_STATIC_LOCAL(const AtomicString, terminatedValue, ("terminated"));
switch (state) {
case WebPresentationConnectionState::Connected:
@@ -64,9 +64,9 @@ const AtomicString& connectionStateToString(WebPresentationConnectionState state
const AtomicString& connectionCloseReasonToString(WebPresentationConnectionCloseReason reason)
{
- DEFINE_STATIC_LOCAL(const AtomicString, errorValue, ("error", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, closedValue, ("closed", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, wentAwayValue, ("wentaway", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, errorValue, ("error"));
+ DEFINE_STATIC_LOCAL(const AtomicString, closedValue, ("closed"));
+ DEFINE_STATIC_LOCAL(const AtomicString, wentAwayValue, ("wentaway"));
switch (reason) {
case WebPresentationConnectionCloseReason::Error:

Powered by Google App Engine
This is Rietveld 408576698