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

Unified Diff: remoting/protocol/socket_wrapper.cc

Issue 7289032: Remove SocketWrapper to expose the threading issues it masks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase once more. Created 9 years, 5 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 | « remoting/protocol/socket_wrapper.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/socket_wrapper.cc
diff --git a/remoting/protocol/socket_wrapper.cc b/remoting/protocol/socket_wrapper.cc
deleted file mode 100644
index 29b2bbfb984bc92677c0fda62dc7963055a8ff16..0000000000000000000000000000000000000000
--- a/remoting/protocol/socket_wrapper.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 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 "remoting/protocol/socket_wrapper.h"
-
-#include "base/logging.h"
-#include "net/base/net_errors.h"
-
-namespace remoting {
-namespace protocol {
-
-SocketWrapper::SocketWrapper(net::Socket* socket)
- : socket_(socket) {
-}
-
-SocketWrapper::~SocketWrapper() {
- DCHECK(!socket_.get());
-}
-
-int SocketWrapper::Read(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
- if (!socket_.get())
- return net::ERR_SOCKET_NOT_CONNECTED;
- return socket_->Read(buf, buf_len, callback);
-}
-
-int SocketWrapper::Write(net::IOBuffer* buf, int buf_len,
- net::CompletionCallback* callback) {
- if (!socket_.get())
- return net::ERR_SOCKET_NOT_CONNECTED;
- return socket_->Write(buf, buf_len, callback);
-}
-
-bool SocketWrapper::SetReceiveBufferSize(int32 size) {
- if (!socket_.get())
- return false;
- return socket_->SetReceiveBufferSize(size);
-}
-
-bool SocketWrapper::SetSendBufferSize(int32 size) {
- if (!socket_.get())
- return false;
- return socket_->SetSendBufferSize(size);
-}
-
-void SocketWrapper::Disconnect() {
- socket_.reset();
-}
-
-} // namespace protocol
-} // namespace remoting
« no previous file with comments | « remoting/protocol/socket_wrapper.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698