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

Side by Side Diff: ipc/ipc_channel_handle.h

Issue 5598010: Convert over to channel handles (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed up bad whitespace Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_IPC_CHANNEL_HANDLE_H_ 5 #ifndef IPC_IPC_CHANNEL_HANDLE_H_
6 #define IPC_IPC_CHANNEL_HANDLE_H_ 6 #define IPC_IPC_CHANNEL_HANDLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 // to work on both Windows and POSIX. 25 // to work on both Windows and POSIX.
26 26
27 namespace IPC { 27 namespace IPC {
28 28
29 struct ChannelHandle { 29 struct ChannelHandle {
30 // Note that serialization for this object is defined in the ParamTraits 30 // Note that serialization for this object is defined in the ParamTraits
31 // template specialization in ipc_message_utils.h. 31 // template specialization in ipc_message_utils.h.
32 std::string name; 32 std::string name;
33 #if defined(OS_POSIX) 33 #if defined(OS_POSIX)
34 base::FileDescriptor socket; 34 base::FileDescriptor socket;
35 #endif 35 #endif // defined(OS_POSIX)
36 36
37 ChannelHandle() {} 37 ChannelHandle() {}
agl 2010/12/08 15:38:57 Constructors are typically first in a class/struct
38 #if defined(OS_POSIX) 38 #if defined(OS_POSIX)
39 ChannelHandle(const std::string& n, const base::FileDescriptor& s) 39 ChannelHandle(const std::string& n, const base::FileDescriptor& s)
40 : name(n), socket(s) {} 40 : name(n), socket(s) {}
41 #else 41 #endif // defined(OS_POSIX)
42 ChannelHandle(const std::string& n) : name(n) {} 42 ChannelHandle(const std::string& n) : name(n) {}
43 #endif 43 ChannelHandle(const char* n) : name(n) {}
44 }; 44 };
45 45
46 } // namespace IPC 46 } // namespace IPC
47 47
48 #endif // IPC_IPC_CHANNEL_HANDLE_H_ 48 #endif // IPC_IPC_CHANNEL_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698