perf: prefer base::StringPiece over std::string for build-time strings (#38717)
* perf: use base::StringPiece in InclusionStatusToString() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in ErrorCodeToString() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in MessageSourceToString() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in CursorTypeToString() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in MediaStreamTypeToString() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in ModifiersToArray() The strings are all build-time constants and this is a private function * perf: use base::StringPiece in WebFrameRenderer::MaybeGetRenderFrame() The strings are all build-time constants and this is a private function
This commit is contained in:
parent
fa6d14c22d
commit
ab49e98401
7 changed files with 44 additions and 40 deletions
|
@ -169,7 +169,7 @@ base::Time ParseTimeProperty(const absl::optional<double>& value) {
|
|||
return base::Time::FromDoubleT(*value);
|
||||
}
|
||||
|
||||
std::string InclusionStatusToString(net::CookieInclusionStatus status) {
|
||||
base::StringPiece InclusionStatusToString(net::CookieInclusionStatus status) {
|
||||
if (status.HasExclusionReason(net::CookieInclusionStatus::EXCLUDE_HTTP_ONLY))
|
||||
return "Failed to create httponly cookie";
|
||||
if (status.HasExclusionReason(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue