Chromium Code Reviews| Index: mojo/edk/system/default_token_serializer_win.h |
| diff --git a/mojo/edk/system/default_token_serializer_win.h b/mojo/edk/system/default_token_serializer_win.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1ee22012e064306f3ef8d02fab9d91f471677292 |
| --- /dev/null |
| +++ b/mojo/edk/system/default_token_serializer_win.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2015 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. |
| + |
| +#ifndef MOJO_EDK_SYSTEM_DEFAULT_TOKEN_SERIALIZER_WIN_H_ |
| +#define MOJO_EDK_SYSTEM_DEFAULT_TOKEN_SERIALIZER_WIN_H_ |
| + |
| +#include "mojo/edk/system/token_serializer_win.h" |
| + |
| +namespace mojo { |
| +namespace edk { |
| + |
| +// A default implementation of TokenSerializer interface. This isn't meant for |
| +// production use (i.e. with multi-process, sandboxes). It's provided for use by |
|
yzshen1
2015/11/20 20:39:55
If it is used for testing only, can it be named To
jam
2015/11/21 01:26:09
well; it can also be used by code that's not sandb
yzshen1
2015/11/23 16:47:02
I feel that it is a little inaccurate to name test
jam
2015/11/23 17:12:35
renamed to simple per discussion
|
| +// unittests. |
| +// Implementation notes: this default implementation works across processes |
| +// without a sandbox. |
| +class MOJO_SYSTEM_IMPL_EXPORT DefaultTokenSerializer : public TokenSerializer { |
| + public: |
| + DefaultTokenSerializer(); |
| + ~DefaultTokenSerializer() override; |
| + |
| + // TokenSerializer implementation: |
| + void CreatePlatformChannelPair(ScopedPlatformHandle* server, |
| + ScopedPlatformHandle* client) override; |
| + void HandleToToken(const PlatformHandle* platform_handles, |
| + size_t count, |
| + uint64_t* tokens) override; |
| + void TokenToHandle(const uint64_t* tokens, |
| + size_t count, |
| + PlatformHandle* handles) override; |
| +}; |
| + |
| +} // namespace edk |
| +} // namespace mojo |
| + |
| +#endif // MOJO_EDK_SYSTEM_DEFAULT_TOKEN_SERIALIZER_WIN_H_ |