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

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

Issue 1466423006: Fix clang/win build after https://codereview.chromium.org/1471123002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | 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_WIN_H_ 5 #ifndef MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_WIN_H_
6 #define MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_WIN_H_ 6 #define MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_WIN_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 11 matching lines...) Expand all
22 : NON_EXPORTED_BASE(public base::MessageLoopForIO::IOHandler) { 22 : NON_EXPORTED_BASE(public base::MessageLoopForIO::IOHandler) {
23 public: 23 public:
24 // |child_process| is a handle to the child process. It's not owned by this 24 // |child_process| is a handle to the child process. It's not owned by this
25 // class but is guaranteed to be alive as long as the child process is 25 // class but is guaranteed to be alive as long as the child process is
26 // running. |pipe| is a handle to the communication pipe to the child process, 26 // running. |pipe| is a handle to the communication pipe to the child process,
27 // which is generated inside mojo::edk::ChildProcessLaunched. It is owned by 27 // which is generated inside mojo::edk::ChildProcessLaunched. It is owned by
28 // this class. 28 // this class.
29 ParentTokenSerializer(HANDLE child_process, ScopedPlatformHandle pipe); 29 ParentTokenSerializer(HANDLE child_process, ScopedPlatformHandle pipe);
30 30
31 private: 31 private:
32 virtual ~ParentTokenSerializer(); 32 virtual ~ParentTokenSerializer() override;
33 33
34 void RegisterIOHandler(); 34 void RegisterIOHandler();
35 void BeginRead(); 35 void BeginRead();
36 36
37 void OnIOCompleted(base::MessageLoopForIO::IOContext* context, 37 void OnIOCompleted(base::MessageLoopForIO::IOContext* context,
38 DWORD bytes_transferred, 38 DWORD bytes_transferred,
39 DWORD error) override; 39 DWORD error) override;
40 40
41 // Helper wrappers around DuplicateHandle. 41 // Helper wrappers around DuplicateHandle.
42 HANDLE DuplicateToChild(HANDLE handle); 42 HANDLE DuplicateToChild(HANDLE handle);
43 HANDLE DuplicateFromChild(HANDLE handle); 43 HANDLE DuplicateFromChild(HANDLE handle);
44 44
45 HANDLE child_process_; 45 HANDLE child_process_;
46 ScopedPlatformHandle pipe_; 46 ScopedPlatformHandle pipe_;
47 base::MessageLoopForIO::IOContext read_context_; 47 base::MessageLoopForIO::IOContext read_context_;
48 base::MessageLoopForIO::IOContext write_context_; 48 base::MessageLoopForIO::IOContext write_context_;
49 49
50 std::vector<char> read_data_; 50 std::vector<char> read_data_;
51 // How many bytes in read_data_ we already read. 51 // How many bytes in read_data_ we already read.
52 uint32_t num_bytes_read_; 52 uint32_t num_bytes_read_;
53 std::vector<char> write_data_; 53 std::vector<char> write_data_;
54 }; 54 };
55 55
56 } // namespace edk 56 } // namespace edk
57 } // namespace mojo 57 } // namespace mojo
58 58
59 #endif // MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_WIN_H_ 59 #endif // MOJO_EDK_SYSTEM_PARENT_TOKEN_SERIALIZER_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698