commit | 972b2ffb443b06246edfb26bc68446c256ccaf22 | [log] [tgz] |
---|---|---|
author | Ryan Sleevi <rsleevi@chromium.org> | Mon May 14 15:45:10 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon May 14 15:45:10 2018 |
tree | c8a7890035cefc9a377afe391c5ab0d86b283b96 | |
parent | f7f609d28c4d78e68712a710c66e9e4d45eef1fe [diff] |
Remove base::string_as_array https://crrev.com/550137 introduced base::data(), along with a specialization for strings to return mutable pointers. Update callers of base::string_as_array() to use base::data() instead. Note that this does come with an observable behaviour change: string_as_array() returns nullptr for empty strings, while base::data() returns the pointer to the NUL terminator (in line with std::data()). However, this can be observed to be safe from the existing callers, due to the preceding resizes that ensure non-empty() strings, or the existing logic to handle empty strings. Bug: 828324 TBR=caitkp@chromium.org, lazyboy@chromium.org, miu@chromium.org, sergeyu@chromium.org Change-Id: I1fb5824b7115ff2b9ebf032f74a860e4cf3f52c6 Reviewed-on: https://chromium-review.googlesource.com/1056014 Commit-Queue: Ryan Sleevi <rsleevi@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#558321}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .