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

Side by Side Diff: ipc/ipc_message.cc

Issue 1414293002: Revert of ipc: Add a member to IPC::Message::Header on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/ipc_message.h ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_message.h" 5 #include "ipc/ipc_message.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 namespace IPC { 42 namespace IPC {
43 43
44 //------------------------------------------------------------------------------ 44 //------------------------------------------------------------------------------
45 45
46 Message::~Message() { 46 Message::~Message() {
47 } 47 }
48 48
49 Message::Message() : base::Pickle(sizeof(Header)) { 49 Message::Message() : base::Pickle(sizeof(Header)) {
50 header()->routing = header()->type = 0; 50 header()->routing = header()->type = 0;
51 header()->flags = GetRefNumUpper24(); 51 header()->flags = GetRefNumUpper24();
52 #if USE_ATTACHMENT_BROKER 52 #if defined(OS_MACOSX)
53 header()->num_brokered_attachments = 0; 53 header()->num_brokered_attachments = 0;
54 #endif 54 #endif
55 #if defined(OS_POSIX) 55 #if defined(OS_POSIX)
56 header()->num_fds = 0; 56 header()->num_fds = 0;
57 header()->pad = 0; 57 header()->pad = 0;
58 #endif 58 #endif
59 Init(); 59 Init();
60 } 60 }
61 61
62 Message::Message(int32_t routing_id, uint32_t type, PriorityValue priority) 62 Message::Message(int32_t routing_id, uint32_t type, PriorityValue priority)
63 : base::Pickle(sizeof(Header)) { 63 : base::Pickle(sizeof(Header)) {
64 header()->routing = routing_id; 64 header()->routing = routing_id;
65 header()->type = type; 65 header()->type = type;
66 DCHECK((priority & 0xffffff00) == 0); 66 DCHECK((priority & 0xffffff00) == 0);
67 header()->flags = priority | GetRefNumUpper24(); 67 header()->flags = priority | GetRefNumUpper24();
68 #if USE_ATTACHMENT_BROKER 68 #if defined(OS_MACOSX)
69 header()->num_brokered_attachments = 0; 69 header()->num_brokered_attachments = 0;
70 #endif 70 #endif
71 #if defined(OS_POSIX) 71 #if defined(OS_POSIX)
72 header()->num_fds = 0; 72 header()->num_fds = 0;
73 header()->pad = 0; 73 header()->pad = 0;
74 #endif 74 #endif
75 Init(); 75 Init();
76 } 76 }
77 77
78 Message::Message(const char* data, int data_len) 78 Message::Message(const char* data, int data_len)
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 bool Message::HasMojoHandles() const { 265 bool Message::HasMojoHandles() const {
266 return attachment_set_.get() && attachment_set_->num_mojo_handles() > 0; 266 return attachment_set_.get() && attachment_set_->num_mojo_handles() > 0;
267 } 267 }
268 268
269 bool Message::HasBrokerableAttachments() const { 269 bool Message::HasBrokerableAttachments() const {
270 return attachment_set_.get() && 270 return attachment_set_.get() &&
271 attachment_set_->num_brokerable_attachments() > 0; 271 attachment_set_->num_brokerable_attachments() > 0;
272 } 272 }
273 273
274 } // namespace IPC 274 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698