Commit d9190370 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Revert "Remove unused methods in std::string StringTraits"

This reverts commit 5159cfc6.

Reason for revert: spec revert for crbug.com/1124142
There are "MojoResult(3): INVALID_ARGUMENT" errors in a CrOS ARC test after this landed.

Original change's description:
> Remove unused methods in std::string StringTraits
> 
> IsNull and SetToNull aren't needed as the STL string type doesn't use
> nullable_is_same_type.
> 
> Change-Id: I0770b42e275e3026749c5409015c4b79941ea56f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386744
> Reviewed-by: Ken Rockot <rockot@google.com>
> Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#803654}

TBR=rockot@google.com,hferreiro@igalia.com

Change-Id: I63114a22d365c1b4c8c8f79f4678e975d7f6c589
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391044Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803944}
parent af8d2353
......@@ -13,6 +13,16 @@ namespace mojo {
template <>
struct StringTraits<std::string> {
static bool IsNull(const std::string& input) {
// std::string is always converted to non-null mojom string.
return false;
}
static void SetToNull(std::string* output) {
// std::string doesn't support null state. Set it to empty instead.
output->clear();
}
static const std::string& GetUTF8(const std::string& input) { return input; }
static bool Read(StringDataView input, std::string* output) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment