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

Side by Side Diff: ipc/ipc_channel_handle.h

Issue 7167017: Fix to bug 75303 (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Improved comment. Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/service_process_util_win.cc ('k') | 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 (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 12 matching lines...) Expand all
23 // 23 //
24 // In sum, when passing a handle to a channel over IPC, use this data structure 24 // In sum, when passing a handle to a channel over IPC, use this data structure
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 ChannelHandle() {} 32 ChannelHandle() {}
33 // The name that is passed in should be an absolute path for Posix.
34 // Otherwise there may be a problem in IPC communication between
35 // processes with different working directories.
33 ChannelHandle(const std::string& n) : name(n) {} 36 ChannelHandle(const std::string& n) : name(n) {}
34 ChannelHandle(const char* n) : name(n) {} 37 ChannelHandle(const char* n) : name(n) {}
35 #if defined(OS_POSIX) 38 #if defined(OS_POSIX)
36 ChannelHandle(const std::string& n, const base::FileDescriptor& s) 39 ChannelHandle(const std::string& n, const base::FileDescriptor& s)
37 : name(n), socket(s) {} 40 : name(n), socket(s) {}
38 #endif // defined(OS_POSIX) 41 #endif // defined(OS_POSIX)
39 42
40 std::string name; 43 std::string name;
41 #if defined(OS_POSIX) 44 #if defined(OS_POSIX)
42 base::FileDescriptor socket; 45 base::FileDescriptor socket;
43 #endif // defined(OS_POSIX) 46 #endif // defined(OS_POSIX)
44 47
45 }; 48 };
46 49
47 } // namespace IPC 50 } // namespace IPC
48 51
49 #endif // IPC_IPC_CHANNEL_HANDLE_H_ 52 #endif // IPC_IPC_CHANNEL_HANDLE_H_
OLDNEW
« no previous file with comments | « chrome/common/service_process_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698