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

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

Issue 1470093004: Fix clang/win build more after https://codereview.chromium.org/1471123002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bleh 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
« no previous file with comments | « no previous file | mojo/edk/system/parent_token_serializer_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_ 5 #ifndef MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_
6 #define MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_ 6 #define MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 25 matching lines...) Expand all
36 PlatformHandle* handles) override; 36 PlatformHandle* handles) override;
37 37
38 scoped_refptr<base::TaskRunner> token_serialize_thread() { 38 scoped_refptr<base::TaskRunner> token_serialize_thread() {
39 return token_serialize_thread_.task_runner(); 39 return token_serialize_thread_.task_runner();
40 } 40 }
41 41
42 private: 42 private:
43 friend struct base::DefaultSingletonTraits<ParentTokenSerializerState>; 43 friend struct base::DefaultSingletonTraits<ParentTokenSerializerState>;
44 44
45 ParentTokenSerializerState(); 45 ParentTokenSerializerState();
46 virtual ~ParentTokenSerializerState(); 46 ~ParentTokenSerializerState() override;
47 47
48 // A separate thread to handle sync IPCs from child processes for exchanging 48 // A separate thread to handle sync IPCs from child processes for exchanging
49 // platform handles with tokens. We use a separate thread because latency is 49 // platform handles with tokens. We use a separate thread because latency is
50 // very sensitive (since any time a pipe is created or sent, a child process 50 // very sensitive (since any time a pipe is created or sent, a child process
51 // makes a sync call to this class). 51 // makes a sync call to this class).
52 base::Thread token_serialize_thread_; 52 base::Thread token_serialize_thread_;
53 53
54 // Used in the parent (unsandboxed) process to hold a mapping between HANDLES 54 // Used in the parent (unsandboxed) process to hold a mapping between HANDLES
55 // and tokens. When a child process wants to send a HANDLE to another process, 55 // and tokens. When a child process wants to send a HANDLE to another process,
56 // it exchanges it to a token and then the other process exchanges that token 56 // it exchanges it to a token and then the other process exchanges that token
57 // back to a HANDLE. 57 // back to a HANDLE.
58 base::Lock lock_; // Guards access to below. 58 base::Lock lock_; // Guards access to below.
59 base::hash_map<uint64_t, HANDLE> token_map_; 59 base::hash_map<uint64_t, HANDLE> token_map_;
60 }; 60 };
61 61
62 } // namespace edk 62 } // namespace edk
63 } // namespace mojo 63 } // namespace mojo
64 64
65 #endif // MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_ 65 #endif // MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_STATE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/parent_token_serializer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698