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

Side by Side Diff: mojo/edk/system/remote_consumer_data_pipe_impl.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/remote_consumer_data_pipe_impl.h" 5 #include "mojo/edk/system/remote_consumer_data_pipe_impl.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "mojo/edk/system/channel.h" 14 #include "mojo/edk/system/channel.h"
15 #include "mojo/edk/system/channel_endpoint.h" 15 #include "mojo/edk/system/channel_endpoint.h"
16 #include "mojo/edk/system/configuration.h" 16 #include "mojo/edk/system/configuration.h"
17 #include "mojo/edk/system/data_pipe.h" 17 #include "mojo/edk/system/data_pipe.h"
18 #include "mojo/edk/system/message_in_transit.h" 18 #include "mojo/edk/system/message_in_transit.h"
19 #include "mojo/edk/system/remote_data_pipe_ack.h" 19 #include "mojo/edk/system/remote_data_pipe_ack.h"
20 20
21 using mojo::embedder::ScopedPlatformHandle; 21 using mojo::platform::ScopedPlatformHandle;
22 using mojo::util::RefPtr; 22 using mojo::util::RefPtr;
23 23
24 namespace mojo { 24 namespace mojo {
25 namespace system { 25 namespace system {
26 26
27 namespace { 27 namespace {
28 28
29 bool ValidateIncomingMessage(size_t element_num_bytes, 29 bool ValidateIncomingMessage(size_t element_num_bytes,
30 size_t capacity_num_bytes, 30 size_t capacity_num_bytes,
31 size_t consumer_num_bytes, 31 size_t consumer_num_bytes,
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 DCHECK(channel_endpoint_); 423 DCHECK(channel_endpoint_);
424 SetConsumerClosed(); 424 SetConsumerClosed();
425 channel_endpoint_->DetachFromClient(); 425 channel_endpoint_->DetachFromClient();
426 channel_endpoint_ = nullptr; 426 channel_endpoint_ = nullptr;
427 if (!producer_in_two_phase_write()) 427 if (!producer_in_two_phase_write())
428 DestroyBuffer(); 428 DestroyBuffer();
429 } 429 }
430 430
431 } // namespace system 431 } // namespace system
432 } // namespace mojo 432 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.h ('k') | mojo/edk/system/remote_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698