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

Side by Side Diff: remoting/protocol/channel_multiplexer.cc

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/channel_multiplexer.h ('k') | remoting/protocol/chromium_port_allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/channel_multiplexer.h" 5 #include "remoting/protocol/channel_multiplexer.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::list<PendingPacket*> pending_packets_; 97 std::list<PendingPacket*> pending_packets_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(MuxChannel); 99 DISALLOW_COPY_AND_ASSIGN(MuxChannel);
100 }; 100 };
101 101
102 class ChannelMultiplexer::MuxSocket : public net::StreamSocket, 102 class ChannelMultiplexer::MuxSocket : public net::StreamSocket,
103 public base::NonThreadSafe, 103 public base::NonThreadSafe,
104 public base::SupportsWeakPtr<MuxSocket> { 104 public base::SupportsWeakPtr<MuxSocket> {
105 public: 105 public:
106 MuxSocket(MuxChannel* channel); 106 MuxSocket(MuxChannel* channel);
107 virtual ~MuxSocket(); 107 ~MuxSocket() override;
108 108
109 void OnWriteComplete(); 109 void OnWriteComplete();
110 void OnWriteFailed(); 110 void OnWriteFailed();
111 void OnPacketReceived(); 111 void OnPacketReceived();
112 112
113 // net::StreamSocket interface. 113 // net::StreamSocket interface.
114 virtual int Read(net::IOBuffer* buffer, int buffer_len, 114 int Read(net::IOBuffer* buffer,
115 const net::CompletionCallback& callback) override; 115 int buffer_len,
116 virtual int Write(net::IOBuffer* buffer, int buffer_len, 116 const net::CompletionCallback& callback) override;
117 const net::CompletionCallback& callback) override; 117 int Write(net::IOBuffer* buffer,
118 int buffer_len,
119 const net::CompletionCallback& callback) override;
118 120
119 virtual int SetReceiveBufferSize(int32 size) override { 121 int SetReceiveBufferSize(int32 size) override {
120 NOTIMPLEMENTED(); 122 NOTIMPLEMENTED();
121 return net::ERR_NOT_IMPLEMENTED; 123 return net::ERR_NOT_IMPLEMENTED;
122 } 124 }
123 virtual int SetSendBufferSize(int32 size) override { 125 int SetSendBufferSize(int32 size) override {
124 NOTIMPLEMENTED(); 126 NOTIMPLEMENTED();
125 return net::ERR_NOT_IMPLEMENTED; 127 return net::ERR_NOT_IMPLEMENTED;
126 } 128 }
127 129
128 virtual int Connect(const net::CompletionCallback& callback) override { 130 int Connect(const net::CompletionCallback& callback) override {
129 NOTIMPLEMENTED(); 131 NOTIMPLEMENTED();
130 return net::ERR_NOT_IMPLEMENTED; 132 return net::ERR_NOT_IMPLEMENTED;
131 } 133 }
132 virtual void Disconnect() override { 134 void Disconnect() override { NOTIMPLEMENTED(); }
133 NOTIMPLEMENTED(); 135 bool IsConnected() const override {
134 }
135 virtual bool IsConnected() const override {
136 NOTIMPLEMENTED(); 136 NOTIMPLEMENTED();
137 return true; 137 return true;
138 } 138 }
139 virtual bool IsConnectedAndIdle() const override { 139 bool IsConnectedAndIdle() const override {
140 NOTIMPLEMENTED(); 140 NOTIMPLEMENTED();
141 return false; 141 return false;
142 } 142 }
143 virtual int GetPeerAddress(net::IPEndPoint* address) const override { 143 int GetPeerAddress(net::IPEndPoint* address) const override {
144 NOTIMPLEMENTED(); 144 NOTIMPLEMENTED();
145 return net::ERR_NOT_IMPLEMENTED; 145 return net::ERR_NOT_IMPLEMENTED;
146 } 146 }
147 virtual int GetLocalAddress(net::IPEndPoint* address) const override { 147 int GetLocalAddress(net::IPEndPoint* address) const override {
148 NOTIMPLEMENTED(); 148 NOTIMPLEMENTED();
149 return net::ERR_NOT_IMPLEMENTED; 149 return net::ERR_NOT_IMPLEMENTED;
150 } 150 }
151 virtual const net::BoundNetLog& NetLog() const override { 151 const net::BoundNetLog& NetLog() const override {
152 NOTIMPLEMENTED(); 152 NOTIMPLEMENTED();
153 return net_log_; 153 return net_log_;
154 } 154 }
155 virtual void SetSubresourceSpeculation() override { 155 void SetSubresourceSpeculation() override { NOTIMPLEMENTED(); }
156 NOTIMPLEMENTED(); 156 void SetOmniboxSpeculation() override { NOTIMPLEMENTED(); }
157 } 157 bool WasEverUsed() const override { return true; }
158 virtual void SetOmniboxSpeculation() override { 158 bool UsingTCPFastOpen() const override { return false; }
159 NOTIMPLEMENTED(); 159 bool WasNpnNegotiated() const override { return false; }
160 } 160 net::NextProto GetNegotiatedProtocol() const override {
161 virtual bool WasEverUsed() const override {
162 return true;
163 }
164 virtual bool UsingTCPFastOpen() const override {
165 return false;
166 }
167 virtual bool WasNpnNegotiated() const override {
168 return false;
169 }
170 virtual net::NextProto GetNegotiatedProtocol() const override {
171 return net::kProtoUnknown; 161 return net::kProtoUnknown;
172 } 162 }
173 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) override { 163 bool GetSSLInfo(net::SSLInfo* ssl_info) override {
174 NOTIMPLEMENTED(); 164 NOTIMPLEMENTED();
175 return false; 165 return false;
176 } 166 }
177 167
178 private: 168 private:
179 MuxChannel* channel_; 169 MuxChannel* channel_;
180 170
181 net::CompletionCallback read_callback_; 171 net::CompletionCallback read_callback_;
182 scoped_refptr<net::IOBuffer> read_buffer_; 172 scoped_refptr<net::IOBuffer> read_buffer_;
183 int read_buffer_size_; 173 int read_buffer_size_;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 channel->OnIncomingPacket(packet.Pass(), done_task); 493 channel->OnIncomingPacket(packet.Pass(), done_task);
504 } 494 }
505 495
506 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet, 496 bool ChannelMultiplexer::DoWrite(scoped_ptr<MultiplexPacket> packet,
507 const base::Closure& done_task) { 497 const base::Closure& done_task) {
508 return writer_.Write(SerializeAndFrameMessage(*packet), done_task); 498 return writer_.Write(SerializeAndFrameMessage(*packet), done_task);
509 } 499 }
510 500
511 } // namespace protocol 501 } // namespace protocol
512 } // namespace remoting 502 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/channel_multiplexer.h ('k') | remoting/protocol/chromium_port_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698