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

Side by Side Diff: remoting/jingle_glue/ssl_socket_adapter.cc

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.h ('k') | remoting/protocol/fake_session.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/jingle_glue/ssl_socket_adapter.h" 5 #include "remoting/jingle_glue/ssl_socket_adapter.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "jingle/glue/utils.h" 10 #include "jingle/glue/utils.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 int64 TransportSocket::NumBytesRead() const { 271 int64 TransportSocket::NumBytesRead() const {
272 NOTREACHED(); 272 NOTREACHED();
273 return -1; 273 return -1;
274 } 274 }
275 275
276 base::TimeDelta TransportSocket::GetConnectTimeMicros() const { 276 base::TimeDelta TransportSocket::GetConnectTimeMicros() const {
277 NOTREACHED(); 277 NOTREACHED();
278 return base::TimeDelta::FromMicroseconds(-1); 278 return base::TimeDelta::FromMicroseconds(-1);
279 } 279 }
280 280
281 net::NextProto TransportSocket::GetNegotiatedProtocol() const {
282 NOTREACHED();
283 return net::kProtoUnknown;
284 }
285
281 int TransportSocket::Read(net::IOBuffer* buf, int buf_len, 286 int TransportSocket::Read(net::IOBuffer* buf, int buf_len,
282 const net::CompletionCallback& callback) { 287 const net::CompletionCallback& callback) {
283 DCHECK(buf); 288 DCHECK(buf);
284 DCHECK(read_callback_.is_null()); 289 DCHECK(read_callback_.is_null());
285 DCHECK(!read_buffer_.get()); 290 DCHECK(!read_buffer_.get());
286 int result = socket_->Recv(buf->data(), buf_len); 291 int result = socket_->Recv(buf->data(), buf_len);
287 if (result < 0) { 292 if (result < 0) {
288 result = net::MapSystemError(socket_->GetError()); 293 result = net::MapSystemError(socket_->GetError());
289 if (result == net::ERR_IO_PENDING) { 294 if (result == net::ERR_IO_PENDING) {
290 read_callback_ = callback; 295 read_callback_ = callback;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 write_buffer_len_ = buffer_len; 377 write_buffer_len_ = buffer_len;
373 return; 378 return;
374 } 379 }
375 } 380 }
376 was_used_to_convey_data_ = true; 381 was_used_to_convey_data_ = true;
377 callback.Run(result); 382 callback.Run(result);
378 } 383 }
379 } 384 }
380 385
381 } // namespace remoting 386 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.h ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698