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

Side by Side Diff: chrome/common/ipc_message.cc

Issue 20027: Capability: passing fds over IPC (Closed)
Patch Set: ... Created 11 years, 10 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 | « chrome/common/ipc_message.h ('k') | chrome/common/ipc_message_utils.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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "chrome/common/ipc_message.h" 5 #include "chrome/common/ipc_message.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h"
8 9
9 namespace IPC { 10 namespace IPC {
10 11
11 //------------------------------------------------------------------------------ 12 //------------------------------------------------------------------------------
12 13
13 Message::~Message() { 14 Message::~Message() {
14 } 15 }
15 16
16 Message::Message() 17 Message::Message()
17 : Pickle(sizeof(Header)) { 18 : Pickle(sizeof(Header)) {
18 header()->routing = header()->type = header()->flags = 0; 19 header()->routing = header()->type = header()->flags = 0;
20 #if defined(OS_POSIX)
21 header()->num_fds = 0;
22 #endif
19 InitLoggingVariables(); 23 InitLoggingVariables();
20 } 24 }
21 25
22 Message::Message(int32 routing_id, uint16 type, PriorityValue priority) 26 Message::Message(int32 routing_id, uint16 type, PriorityValue priority)
23 : Pickle(sizeof(Header)) { 27 : Pickle(sizeof(Header)) {
24 header()->routing = routing_id; 28 header()->routing = routing_id;
25 header()->type = type; 29 header()->type = type;
26 header()->flags = priority; 30 header()->flags = priority;
31 #if defined(OS_POSIX)
32 header()->num_fds = 0;
33 #endif
27 InitLoggingVariables(); 34 InitLoggingVariables();
28 } 35 }
29 36
30 Message::Message(const char* data, int data_len) : Pickle(data, data_len) { 37 Message::Message(const char* data, int data_len) : Pickle(data, data_len) {
31 InitLoggingVariables(); 38 InitLoggingVariables();
32 } 39 }
33 40
34 Message::Message(const Message& other) : Pickle(other) { 41 Message::Message(const Message& other) : Pickle(other) {
35 InitLoggingVariables(); 42 InitLoggingVariables();
36 } 43 }
(...skipping 27 matching lines...) Expand all
64 return *(reinterpret_cast<const int64*>(data)); 71 return *(reinterpret_cast<const int64*>(data));
65 } 72 }
66 73
67 void Message::set_received_time(int64 time) const { 74 void Message::set_received_time(int64 time) const {
68 received_time_ = time; 75 received_time_ = time;
69 } 76 }
70 #endif 77 #endif
71 78
72 } // namespace IPC 79 } // namespace IPC
73 80
OLDNEW
« no previous file with comments | « chrome/common/ipc_message.h ('k') | chrome/common/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698