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

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

Issue 1483823004: EDK: Move {platform_handle,scoped_platform_handle}.* to //mojo/edk/platform. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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/transport_data.h ('k') | mojo/edk/test/multiprocess_test_helper.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 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 #include "mojo/edk/system/transport_data.h" 5 #include "mojo/edk/system/transport_data.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "mojo/edk/system/channel.h" 12 #include "mojo/edk/system/channel.h"
13 #include "mojo/edk/system/configuration.h" 13 #include "mojo/edk/system/configuration.h"
14 #include "mojo/edk/system/message_in_transit.h" 14 #include "mojo/edk/system/message_in_transit.h"
15 15
16 using mojo::embedder::ScopedPlatformHandle; 16 using mojo::platform::ScopedPlatformHandle;
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace system { 19 namespace system {
20 20
21 // The maximum amount of space needed per platform handle. 21 // The maximum amount of space needed per platform handle.
22 // (|{Channel,RawChannel}::GetSerializedPlatformHandleSize()| should always 22 // (|{Channel,RawChannel}::GetSerializedPlatformHandleSize()| should always
23 // return a value which is at most this. This is only used to calculate 23 // return a value which is at most this. This is only used to calculate
24 // |TransportData::kMaxBufferSize|. This value should be a multiple of the 24 // |TransportData::kMaxBufferSize|. This value should be a multiple of the
25 // alignment in order to simplify calculations, even though the actual amount of 25 // alignment in order to simplify calculations, even though the actual amount of
26 // space needed need not be a multiple of the alignment. 26 // space needed need not be a multiple of the alignment.
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 const void* source = static_cast<const char*>(buffer) + offset; 338 const void* source = static_cast<const char*>(buffer) + offset;
339 (*dispatchers)[i] = Dispatcher::TransportDataAccess::Deserialize( 339 (*dispatchers)[i] = Dispatcher::TransportDataAccess::Deserialize(
340 channel, handle_table[i].type, source, size, platform_handles.get()); 340 channel, handle_table[i].type, source, size, platform_handles.get());
341 } 341 }
342 342
343 return dispatchers; 343 return dispatchers;
344 } 344 }
345 345
346 } // namespace system 346 } // namespace system
347 } // namespace mojo 347 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/transport_data.h ('k') | mojo/edk/test/multiprocess_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698