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

Side by Side Diff: ipc/handle_win.h

Issue 1286883003: Revert of IPC: Add attachment brokering support to the message header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months 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 | « ipc/handle_attachment_win.cc ('k') | ipc/handle_win.cc » ('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 IPC_HANDLE_WIN_H_ 5 #ifndef IPC_HANDLE_WIN_H_
6 #define IPC_HANDLE_WIN_H_ 6 #define IPC_HANDLE_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "ipc/ipc_export.h" 10 #include "ipc/ipc_export.h"
(...skipping 10 matching lines...) Expand all
21 // A placeholder value to be used by the receiving IPC channel, since the 21 // A placeholder value to be used by the receiving IPC channel, since the
22 // permissions information is only used by the broker process. 22 // permissions information is only used by the broker process.
23 INVALID, 23 INVALID,
24 // The new HANDLE will have the same permissions as the old HANDLE. 24 // The new HANDLE will have the same permissions as the old HANDLE.
25 DUPLICATE, 25 DUPLICATE,
26 // The new HANDLE will have file read and write permissions. 26 // The new HANDLE will have file read and write permissions.
27 FILE_READ_WRITE, 27 FILE_READ_WRITE,
28 MAX_PERMISSIONS = FILE_READ_WRITE 28 MAX_PERMISSIONS = FILE_READ_WRITE
29 }; 29 };
30 30
31 // Default constructor makes an invalid HANDLE.
32 HandleWin();
33 HandleWin(const HANDLE& handle, Permissions permissions); 31 HandleWin(const HANDLE& handle, Permissions permissions);
34 32
35 HANDLE get_handle() const { return handle_; } 33 HANDLE get_handle() const { return handle_; }
36 void set_handle(HANDLE handle) { handle_ = handle; } 34 void set_handle(HANDLE handle) { handle_ = handle; }
37 Permissions get_permissions() const { return permissions_; } 35 Permissions get_permissions() const { return permissions_; }
38 36
39 private: 37 private:
40 HANDLE handle_; 38 HANDLE handle_;
41 Permissions permissions_; 39 Permissions permissions_;
42 }; 40 };
43 41
44 template <> 42 template <>
45 struct IPC_EXPORT ParamTraits<HandleWin> { 43 struct IPC_EXPORT ParamTraits<HandleWin> {
46 typedef HandleWin param_type; 44 typedef HandleWin param_type;
47 static void Write(Message* m, const param_type& p); 45 static void Write(Message* m, const param_type& p);
48 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p); 46 static bool Read(const Message* m, base::PickleIterator* iter, param_type* p);
49 static void Log(const param_type& p, std::string* l); 47 static void Log(const param_type& p, std::string* l);
50 }; 48 };
51 49
52 } // namespace IPC 50 } // namespace IPC
53 51
54 #endif // IPC_HANDLE_WIN_H_ 52 #endif // IPC_HANDLE_WIN_H_
OLDNEW
« no previous file with comments | « ipc/handle_attachment_win.cc ('k') | ipc/handle_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698