Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: mojo/public/cpp/bindings/string_traits_nullable_string16.h

Issue 1913043002: Convert ManifestManager IPCs to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_NULLABLE_STRING16_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_NULLABLE_STRING16_H_
7
8 #include "base/strings/nullable_string16.h"
9 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
10 #include "mojo/public/cpp/bindings/string_traits.h"
11
12 namespace mojo {
13
14 template <>
15 struct StringTraits<base::NullableString16> {
16 static bool IsNull(const base::NullableString16& input) {
17 return input.is_null();
18 }
19 static void SetToNull(base::NullableString16* output);
20
21 static void* SetUpContext(const base::NullableString16& input);
22 static void TearDownContext(const base::NullableString16& input,
23 void* context);
24
25 static size_t GetSize(const base::NullableString16& input, void* context);
26
27 static const char* GetData(const base::NullableString16& input,
28 void* context);
29
30 static bool Read(StringDataView input, base::NullableString16* output);
31 };
32
33 } // namespace mojo
34
35 #endif // MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_NULLABLE_STRING16_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698