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

Side by Side Diff: mojo/edk/system/simple_broker.h

Issue 1465183005: Rename mojo::TokenSerializer to mojo::Broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win component Created 5 years 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_EDK_SYSTEM_SIMPLE_TOKEN_SERIALIZER_WIN_H_ 5 #ifndef MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_
6 #define MOJO_EDK_SYSTEM_SIMPLE_TOKEN_SERIALIZER_WIN_H_ 6 #define MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_
7 7
8 #include "mojo/edk/system/token_serializer_win.h" 8 #include "mojo/edk/system/broker.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace edk { 11 namespace edk {
12 12
13 // A simple implementation of TokenSerializer interface. This isn't meant for 13 // A simple implementation of Broker interface. This isn't meant for production
14 // production use (i.e. with multi-process, sandboxes). It's provided for use by 14 // use (i.e. with multi-process, sandboxes). It's provided for use by unittests.
15 // unittests.
16 // Implementation note: this default implementation works across processes 15 // Implementation note: this default implementation works across processes
17 // without a sandbox. 16 // without a sandbox.
18 class MOJO_SYSTEM_IMPL_EXPORT SimpleTokenSerializer : public TokenSerializer { 17 class MOJO_SYSTEM_IMPL_EXPORT SimpleBroker : public Broker {
19 public: 18 public:
20 SimpleTokenSerializer(); 19 SimpleBroker();
21 ~SimpleTokenSerializer() override; 20 ~SimpleBroker() override;
22 21
23 // TokenSerializer implementation: 22 // Broker implementation:
23 #if defined(OS_WIN)
24 void CreatePlatformChannelPair(ScopedPlatformHandle* server, 24 void CreatePlatformChannelPair(ScopedPlatformHandle* server,
25 ScopedPlatformHandle* client) override; 25 ScopedPlatformHandle* client) override;
26 void HandleToToken(const PlatformHandle* platform_handles, 26 void HandleToToken(const PlatformHandle* platform_handles,
27 size_t count, 27 size_t count,
28 uint64_t* tokens) override; 28 uint64_t* tokens) override;
29 void TokenToHandle(const uint64_t* tokens, 29 void TokenToHandle(const uint64_t* tokens,
30 size_t count, 30 size_t count,
31 PlatformHandle* handles) override; 31 PlatformHandle* handles) override;
32 #endif
32 }; 33 };
33 34
34 } // namespace edk 35 } // namespace edk
35 } // namespace mojo 36 } // namespace mojo
36 37
37 #endif // MOJO_EDK_SYSTEM_SIMPLE_TOKEN_SERIALIZER_WIN_H_ 38 #endif // MOJO_EDK_SYSTEM_SIMPLE_BROKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698