naiveproxy/chrome/chrome_cleaner/interfaces/string16_embedded_nulls.mojom

25 lines
931 B
Plaintext
Raw Normal View History

2018-12-10 05:59:24 +03:00
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module chrome_cleaner.mojom;
// Typemapped to chrome_cleaner::String16EmbeddedNulls.
//
// Note: Mojo doesn't allow sending null arrays over the wire, and the strings
// represented by this type can be empty (without a null at the end).
// Because of that, represented as a union of either something that is
// always empty (NullValue) or a non-empty array of uint16.
union String16EmbeddedNulls {
// The underlying string is a null array (not the same as an empty string,
// which has at least one character '\0').
NullValue? null_value;
// The underlying string is either a null-terminated empty string (size is 1),
// or a non-empty string that can be either null-terminated or not.
array<uint16> value;
};
struct NullValue {
};