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

Unified Diff: mojo/services/network/tcp_connected_socket_impl.h

Issue 1873463003: Remove mojo network service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/services/network/tcp_bound_socket_impl.cc ('k') | mojo/services/network/tcp_connected_socket_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/tcp_connected_socket_impl.h
diff --git a/mojo/services/network/tcp_connected_socket_impl.h b/mojo/services/network/tcp_connected_socket_impl.h
deleted file mode 100644
index 1131bf6da01741903d1723dcc7f942586d26124e..0000000000000000000000000000000000000000
--- a/mojo/services/network/tcp_connected_socket_impl.h
+++ /dev/null
@@ -1,79 +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.
-
-#ifndef MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_
-#define MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/message_pump/handle_watcher.h"
-#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/services/network/public/interfaces/tcp_connected_socket.mojom.h"
-#include "mojo/shell/public/cpp/message_loop_ref.h"
-#include "net/socket/tcp_socket.h"
-
-namespace mojo {
-
-class MojoToNetPendingBuffer;
-class NetToMojoPendingBuffer;
-
-class TCPConnectedSocketImpl : public TCPConnectedSocket {
- public:
- TCPConnectedSocketImpl(scoped_ptr<net::TCPSocket> socket,
- ScopedDataPipeConsumerHandle send_stream,
- ScopedDataPipeProducerHandle receive_stream,
- InterfaceRequest<TCPConnectedSocket> request,
- scoped_ptr<mojo::MessageLoopRef> app_refcount);
- ~TCPConnectedSocketImpl() override;
-
- private:
- void OnConnectionError();
-
- // "Receiving" in this context means reading from TCPSocket and writing to
- // the Mojo receive_stream.
- void ReceiveMore();
- void OnReceiveStreamReady(MojoResult result);
- void DidReceive(bool completed_synchronously, int result);
- void ShutdownReceive();
- void ListenForReceivePeerClosed();
- void OnReceiveDataPipeClosed(MojoResult result);
-
- // "Writing" is reading from the Mojo send_stream and writing to the
- // TCPSocket.
- void SendMore();
- void OnSendStreamReady(MojoResult result);
- void DidSend(bool completed_asynchronously, int result);
- void ShutdownSend();
- void ListenForSendPeerClosed();
- void OnSendDataPipeClosed(MojoResult result);
-
- void DeleteIfNeeded();
-
- scoped_ptr<net::TCPSocket> socket_;
-
- // The *stream handles will be null while there is an in-progress transation
- // between net and mojo. During this time, the handle will be owned by the
- // *PendingBuffer.
-
- // For reading from the network and writing to Mojo pipe.
- ScopedDataPipeConsumerHandle send_stream_;
- scoped_refptr<NetToMojoPendingBuffer> pending_receive_;
- common::HandleWatcher receive_handle_watcher_;
-
- // For reading from the Mojo pipe and writing to the network.
- ScopedDataPipeProducerHandle receive_stream_;
- scoped_refptr<MojoToNetPendingBuffer> pending_send_;
- common::HandleWatcher send_handle_watcher_;
-
- // To bind to the message pipe.
- Binding<TCPConnectedSocket> binding_;
-
- scoped_ptr<mojo::MessageLoopRef> app_refcount_;
-
- base::WeakPtrFactory<TCPConnectedSocketImpl> weak_ptr_factory_;
-};
-
-} // namespace mojo
-
-#endif // MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_
« no previous file with comments | « mojo/services/network/tcp_bound_socket_impl.cc ('k') | mojo/services/network/tcp_connected_socket_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698