diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 02:39:11 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 02:39:11 +0000 |
commit | 5f8f8ea64b1a9e0a555defb4bd57877d9770333b (patch) | |
tree | bc54693f57ee71dea3025b16406241744e2522f9 /remoting | |
parent | d6aad7d9a5a1c413ef52b4de912ba8f01e88f9e7 (diff) | |
download | chromium_src-5f8f8ea64b1a9e0a555defb4bd57877d9770333b.zip chromium_src-5f8f8ea64b1a9e0a555defb4bd57877d9770333b.tar.gz chromium_src-5f8f8ea64b1a9e0a555defb4bd57877d9770333b.tar.bz2 |
Removed stream_writer.[cc|h]
StreamWriter classes are not used anymore. Removing them.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/5575005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/protocol/connection_to_client.h | 1 | ||||
-rw-r--r-- | remoting/protocol/connection_to_host.h | 1 | ||||
-rw-r--r-- | remoting/protocol/jingle_connection_to_host.h | 1 | ||||
-rw-r--r-- | remoting/protocol/stream_writer.cc | 47 | ||||
-rw-r--r-- | remoting/protocol/stream_writer.h | 59 | ||||
-rw-r--r-- | remoting/remoting.gyp | 2 |
6 files changed, 0 insertions, 111 deletions
diff --git a/remoting/protocol/connection_to_client.h b/remoting/protocol/connection_to_client.h index 5984528..749ef5c 100644 --- a/remoting/protocol/connection_to_client.h +++ b/remoting/protocol/connection_to_client.h @@ -12,7 +12,6 @@ #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "remoting/protocol/session.h" -#include "remoting/protocol/stream_writer.h" #include "remoting/protocol/video_writer.h" namespace remoting { diff --git a/remoting/protocol/connection_to_host.h b/remoting/protocol/connection_to_host.h index 0d1c602..c3b2c54 100644 --- a/remoting/protocol/connection_to_host.h +++ b/remoting/protocol/connection_to_host.h @@ -12,7 +12,6 @@ #include "remoting/proto/internal.pb.h" #include "remoting/protocol/host_stub.h" #include "remoting/protocol/input_stub.h" -#include "remoting/protocol/stream_writer.h" namespace remoting { namespace protocol { diff --git a/remoting/protocol/jingle_connection_to_host.h b/remoting/protocol/jingle_connection_to_host.h index b006022..b8b64b4 100644 --- a/remoting/protocol/jingle_connection_to_host.h +++ b/remoting/protocol/jingle_connection_to_host.h @@ -27,7 +27,6 @@ #include "remoting/protocol/message_reader.h" #include "remoting/protocol/session.h" #include "remoting/protocol/session_manager.h" -#include "remoting/protocol/stream_writer.h" class MessageLoop; diff --git a/remoting/protocol/stream_writer.cc b/remoting/protocol/stream_writer.cc deleted file mode 100644 index 4ceb1c4..0000000 --- a/remoting/protocol/stream_writer.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2010 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/stream_writer.h" - -#include "base/message_loop.h" -#include "remoting/protocol/buffered_socket_writer.h" -#include "remoting/protocol/util.h" - -namespace remoting { -namespace protocol { - -StreamWriterBase::StreamWriterBase() - : socket_(NULL), - buffered_writer_(new BufferedSocketWriter()) { -} - -StreamWriterBase::~StreamWriterBase() { } - -void StreamWriterBase::Init(net::Socket* socket) { - socket_ = socket; - buffered_writer_->Init(socket, NULL); -} - -int StreamWriterBase::GetBufferSize() { - return buffered_writer_->GetBufferSize(); -} - -int StreamWriterBase::GetPendingMessages() { - return buffered_writer_->GetBufferChunks(); -} - -void StreamWriterBase::Close() { - buffered_writer_->Close(); -} - -bool EventStreamWriter::SendMessage(const EventMessage& message) { - return buffered_writer_->Write(SerializeAndFrameMessage(message)); -} - -bool ControlStreamWriter::SendMessage(const ControlMessage& message) { - return buffered_writer_->Write(SerializeAndFrameMessage(message)); -} - -} // namespace protocol -} // namespace remoting diff --git a/remoting/protocol/stream_writer.h b/remoting/protocol/stream_writer.h deleted file mode 100644 index dbf026c..0000000 --- a/remoting/protocol/stream_writer.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2010 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 REMOTING_PROTOCOL_STREAM_WRITER_H_ -#define REMOTING_PROTOCOL_STREAM_WRITER_H_ - -#include "base/ref_counted.h" -#include "remoting/proto/internal.pb.h" - -namespace net { -class Socket; -} // namespace net - -namespace remoting { -namespace protocol { - -class BufferedSocketWriter; - -class StreamWriterBase { - public: - StreamWriterBase(); - virtual ~StreamWriterBase(); - - // Initializes the writer. Must be called on the thread the |socket| belongs - // to. - void Init(net::Socket* socket); - - // Return current buffer state. Can be called from any thread. - int GetBufferSize(); - int GetPendingMessages(); - - // Stop writing and drop pending data. Must be called from the same thread as - // Init(). - void Close(); - - protected: - net::Socket* socket_; - scoped_refptr<BufferedSocketWriter> buffered_writer_; -}; - -class EventStreamWriter : public StreamWriterBase { - public: - // Sends the |message| or returns false if called before Init(). - // Can be called on any thread. - bool SendMessage(const EventMessage& message); -}; - -class ControlStreamWriter : public StreamWriterBase { - public: - // Sends the |message| or returns false if called before Init(). - // Can be called on any thread. - bool SendMessage(const ControlMessage& message); -}; - -} // namespace protocol -} // namespace remoting - -#endif // REMOTING_PROTOCOL_STREAM_WRITER_H_ diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 3c39300..e9a7789 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -405,8 +405,6 @@ 'protocol/session_manager.h', 'protocol/socket_reader_base.cc', 'protocol/socket_reader_base.h', - 'protocol/stream_writer.cc', - 'protocol/stream_writer.h', 'protocol/util.cc', 'protocol/util.h', 'protocol/video_reader.cc', |