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

Side by Side Diff: mojo/edk/system/transport_data.h

Issue 728553002: Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | mojo/edk/system/transport_data.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_ 5 #ifndef MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
6 #define MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_ 6 #define MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 public: 77 public:
78 // The maximum size of a single serialized dispatcher. This must be a multiple 78 // The maximum size of a single serialized dispatcher. This must be a multiple
79 // of |kMessageAlignment|. 79 // of |kMessageAlignment|.
80 static const size_t kMaxSerializedDispatcherSize = 10000; 80 static const size_t kMaxSerializedDispatcherSize = 10000;
81 81
82 // The maximum number of platform handles to attach for a single serialized 82 // The maximum number of platform handles to attach for a single serialized
83 // dispatcher. 83 // dispatcher.
84 static const size_t kMaxSerializedDispatcherPlatformHandles = 2; 84 static const size_t kMaxSerializedDispatcherPlatformHandles = 2;
85 85
86 // The maximum possible size of a valid transport data buffer. 86 // The maximum possible size of a valid transport data buffer.
87 static const size_t kMaxBufferSize; 87 static size_t GetMaxBufferSize();
88 88
89 // The maximum total number of platform handles that may be attached. 89 // The maximum total number of platform handles that may be attached.
90 static const size_t kMaxPlatformHandles; 90 static size_t GetMaxPlatformHandles();
91 91
92 TransportData(scoped_ptr<DispatcherVector> dispatchers, Channel* channel); 92 TransportData(scoped_ptr<DispatcherVector> dispatchers, Channel* channel);
93 93
94 #if defined(OS_POSIX) 94 #if defined(OS_POSIX)
95 // This is a hacky POSIX-only constructor to directly attach only platform 95 // This is a hacky POSIX-only constructor to directly attach only platform
96 // handles to a message, used by |RawChannelPosix| to split messages with too 96 // handles to a message, used by |RawChannelPosix| to split messages with too
97 // many platform handles into multiple messages. |Header| will be present, but 97 // many platform handles into multiple messages. |Header| will be present, but
98 // be zero. (No other information will be attached, and 98 // be zero. (No other information will be attached, and
99 // |RawChannel::GetSerializedPlatformHandleSize()| should return zero.) 99 // |RawChannel::GetSerializedPlatformHandleSize()| should return zero.)
100 explicit TransportData( 100 explicit TransportData(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|. 183 // TODO(vtl): With C++11, change it to a vector of |ScopedPlatformHandles|.
184 embedder::ScopedPlatformHandleVectorPtr platform_handles_; 184 embedder::ScopedPlatformHandleVectorPtr platform_handles_;
185 185
186 DISALLOW_COPY_AND_ASSIGN(TransportData); 186 DISALLOW_COPY_AND_ASSIGN(TransportData);
187 }; 187 };
188 188
189 } // namespace system 189 } // namespace system
190 } // namespace mojo 190 } // namespace mojo
191 191
192 #endif // MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_ 192 #endif // MOJO_EDK_SYSTEM_TRANSPORT_DATA_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/test_utils.h ('k') | mojo/edk/system/transport_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698