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

Unified Diff: mojo/edk/system/child_token_serializer_win.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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/child_token_serializer_win.h
diff --git a/mojo/edk/system/child_token_serializer_win.h b/mojo/edk/system/child_token_serializer_win.h
deleted file mode 100644
index f75e5843be52917b8dec645cb41d98da81b42a20..0000000000000000000000000000000000000000
--- a/mojo/edk/system/child_token_serializer_win.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// 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_CHILD_TOKEN_SERIALIZER_WIN_H_
-#define MOJO_EDK_SYSTEM_CHILD_TOKEN_SERIALIZER_WIN_H_
-
-#include "base/memory/singleton.h"
-#include "base/synchronization/lock_impl.h"
-#include "mojo/edk/embedder/scoped_platform_handle.h"
-#include "mojo/edk/system/system_impl_export.h"
-#include "mojo/edk/system/token_serializer_win.h"
-
-namespace mojo {
-namespace edk {
-struct TokenSerializerMessage;
-
-// An implementation of TokenSerializer used in (sandboxed) child processes. It
-// talks over sync IPCs to the (unsandboxed) parent process (specifically,
-// ParentTokenSerializer) to convert handles to tokens and vice versa.
-class MOJO_SYSTEM_IMPL_EXPORT ChildTokenSerializer : public TokenSerializer {
- public:
- static ChildTokenSerializer* GetInstance();
-
- // Passes the platform handle that is used to talk to ParentTokenSerializer.
- void SetParentTokenSerializerHandle(ScopedPlatformHandle handle);
-
- // 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;
-
- private:
- friend struct base::DefaultSingletonTraits<ChildTokenSerializer>;
-
- ChildTokenSerializer();
- ~ChildTokenSerializer() override;
-
- // Helper method to write the given message and read back the result.
- bool WriteAndReadResponse(TokenSerializerMessage* message,
- void* response,
- uint32_t response_size);
-
- // Guards access to below.
- // We use LockImpl instead of Lock because the latter adds thread checking
- // that we don't want (since we lock in the constructor and unlock on another
- // thread.
- base::internal::LockImpl lock_;
- ScopedPlatformHandle handle_;
-};
-
-} // namespace edk
-} // namespace mojo
-
-#endif // MOJO_EDK_SYSTEM_CHILD_TOKEN_SERIALIZER_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698