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

Side by Side Diff: mojo/system/message_in_transit.cc

Issue 133213012: Mojo: TYPE_CHANNEL -> kTypeChannel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/message_in_transit.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "mojo/system/message_in_transit.h" 5 #include "mojo/system/message_in_transit.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <new> 10 #include <new>
(...skipping 14 matching lines...) Expand all
25 25
26 COMPILE_ASSERT(sizeof(MessageInTransit) % 26 COMPILE_ASSERT(sizeof(MessageInTransit) %
27 MessageInTransit::kMessageAlignment == 0, 27 MessageInTransit::kMessageAlignment == 0,
28 sizeof_MessageInTransit_not_a_multiple_of_alignment); 28 sizeof_MessageInTransit_not_a_multiple_of_alignment);
29 29
30 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 30 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
31 MessageInTransit::kTypeMessagePipeEndpoint; 31 MessageInTransit::kTypeMessagePipeEndpoint;
32 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 32 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
33 MessageInTransit::kTypeMessagePipe; 33 MessageInTransit::kTypeMessagePipe;
34 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type 34 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Type
35 MessageInTransit::TYPE_CHANNEL; 35 MessageInTransit::kTypeChannel;
36 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype 36 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
37 MessageInTransit::kSubtypeMessagePipeEndpointData; 37 MessageInTransit::kSubtypeMessagePipeEndpointData;
38 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype 38 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::Subtype
39 MessageInTransit::kSubtypeMessagePipePeerClosed; 39 MessageInTransit::kSubtypeMessagePipePeerClosed;
40 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId 40 STATIC_CONST_MEMBER_DEFINITION const MessageInTransit::EndpointId
41 MessageInTransit::kInvalidEndpointId; 41 MessageInTransit::kInvalidEndpointId;
42 STATIC_CONST_MEMBER_DEFINITION const size_t MessageInTransit::kMessageAlignment; 42 STATIC_CONST_MEMBER_DEFINITION const size_t MessageInTransit::kMessageAlignment;
43 43
44 // static 44 // static
45 MessageInTransit* MessageInTransit::Create(Type type, 45 MessageInTransit* MessageInTransit::Create(Type type,
(...skipping 13 matching lines...) Expand all
59 MessageInTransit* rv = 59 MessageInTransit* rv =
60 new (buffer) MessageInTransit(num_bytes, type, subtype); 60 new (buffer) MessageInTransit(num_bytes, type, subtype);
61 memcpy(buffer + sizeof(MessageInTransit), bytes, num_bytes); 61 memcpy(buffer + sizeof(MessageInTransit), bytes, num_bytes);
62 memset(buffer + size_with_header, 0, 62 memset(buffer + size_with_header, 0,
63 size_with_header_and_padding - size_with_header); 63 size_with_header_and_padding - size_with_header);
64 return rv; 64 return rv;
65 } 65 }
66 66
67 } // namespace system 67 } // namespace system
68 } // namespace mojo 68 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/message_in_transit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698