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

Unified Diff: mojo/edk/system/incoming_endpoint.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/incoming_endpoint.h ('k') | mojo/edk/system/local_data_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/incoming_endpoint.cc
diff --git a/mojo/edk/system/incoming_endpoint.cc b/mojo/edk/system/incoming_endpoint.cc
deleted file mode 100644
index 14f1a71816287e0a4e41dacece0838aac099b036..0000000000000000000000000000000000000000
--- a/mojo/edk/system/incoming_endpoint.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "mojo/edk/system/incoming_endpoint.h"
-
-#include "base/logging.h"
-#include "mojo/edk/system/channel_endpoint.h"
-#include "mojo/edk/system/message_in_transit.h"
-#include "mojo/edk/system/message_pipe.h"
-
-namespace mojo {
-namespace system {
-
-IncomingEndpoint::IncomingEndpoint() {
-}
-
-scoped_refptr<ChannelEndpoint> IncomingEndpoint::Init() {
- endpoint_ = new ChannelEndpoint(this, 0);
- return endpoint_;
-}
-
-scoped_refptr<MessagePipe> IncomingEndpoint::ConvertToMessagePipe() {
- base::AutoLock locker(lock_);
- scoped_refptr<MessagePipe> message_pipe(
- MessagePipe::CreateLocalProxyFromExisting(&message_queue_,
- endpoint_.get()));
- DCHECK(message_queue_.IsEmpty());
- endpoint_ = nullptr;
- return message_pipe;
-}
-
-void IncomingEndpoint::Close() {
- base::AutoLock locker(lock_);
- if (endpoint_) {
- endpoint_->DetachFromClient();
- endpoint_ = nullptr;
- }
-}
-
-bool IncomingEndpoint::OnReadMessage(unsigned /*port*/,
- MessageInTransit* message) {
- base::AutoLock locker(lock_);
- if (!endpoint_)
- return false;
-
- message_queue_.AddMessage(make_scoped_ptr(message));
- return true;
-}
-
-void IncomingEndpoint::OnDetachFromChannel(unsigned /*port*/) {
- Close();
-}
-
-IncomingEndpoint::~IncomingEndpoint() {
-}
-
-} // namespace system
-} // namespace mojo
« no previous file with comments | « mojo/edk/system/incoming_endpoint.h ('k') | mojo/edk/system/local_data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698