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

Side by Side Diff: ipc/ipc_message.cc

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). Created 7 years, 1 month 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 | « ipc/ipc_message.h ('k') | ipc/ipc_message_macros.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) 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 "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 : Pickle(sizeof(Header)) { 43 : Pickle(sizeof(Header)) {
44 header()->routing = header()->type = 0; 44 header()->routing = header()->type = 0;
45 header()->flags = GetRefNumUpper24(); 45 header()->flags = GetRefNumUpper24();
46 #if defined(OS_POSIX) 46 #if defined(OS_POSIX)
47 header()->num_fds = 0; 47 header()->num_fds = 0;
48 header()->pad = 0; 48 header()->pad = 0;
49 #endif 49 #endif
50 InitLoggingVariables(); 50 InitLoggingVariables();
51 } 51 }
52 52
53 Message::Message(int32 routing_id, uint32 type) 53 Message::Message(int32 routing_id, uint32 type, PriorityValue priority)
54 : Pickle(sizeof(Header)) { 54 : Pickle(sizeof(Header)) {
55 header()->routing = routing_id; 55 header()->routing = routing_id;
56 header()->type = type; 56 header()->type = type;
57 header()->flags = GetRefNumUpper24(); 57 DCHECK((priority & 0xffffff00) == 0);
58 header()->flags = priority | GetRefNumUpper24();
58 #if defined(OS_POSIX) 59 #if defined(OS_POSIX)
59 header()->num_fds = 0; 60 header()->num_fds = 0;
60 header()->pad = 0; 61 header()->pad = 0;
61 #endif 62 #endif
62 InitLoggingVariables(); 63 InitLoggingVariables();
63 } 64 }
64 65
65 Message::Message(const char* data, size_t data_len) 66 Message::Message(const char* data, int data_len) : Pickle(data, data_len) {
66 : Pickle(data, data_len) {
67 InitLoggingVariables(); 67 InitLoggingVariables();
68 } 68 }
69 69
70 Message::Message(const Message& other) : Pickle(other) { 70 Message::Message(const Message& other) : Pickle(other) {
71 InitLoggingVariables(); 71 InitLoggingVariables();
72 #if defined(OS_POSIX) 72 #if defined(OS_POSIX)
73 file_descriptor_set_ = other.file_descriptor_set_; 73 file_descriptor_set_ = other.file_descriptor_set_;
74 #endif 74 #endif
75 } 75 }
76 76
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void Message::EnsureFileDescriptorSet() { 155 void Message::EnsureFileDescriptorSet() {
156 if (file_descriptor_set_.get() == NULL) 156 if (file_descriptor_set_.get() == NULL)
157 file_descriptor_set_ = new FileDescriptorSet; 157 file_descriptor_set_ = new FileDescriptorSet;
158 } 158 }
159 159
160 #endif 160 #endif
161 161
162 } // namespace IPC 162 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message.h ('k') | ipc/ipc_message_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698