Use string.substr instead of string.replace to save a copy
Pass by constref and only copy up to the first 1000 characters, rather than copying it all and inserting a nullptr and ellipsis Also removed the old definition of kMaxUrlLength from media_log.h and the old truncate method definition Bug: 1090752 Change-Id: I6665f010937c802b94da9fd344ab3baf6af88a99 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299195 Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#788846}
Showing
Please register or sign in to comment