| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "jingle/notifier/base/proxy_resolving_client_socket.h" | 5 #include "jingle/notifier/base/proxy_resolving_client_socket.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 return false; | 335 return false; |
| 336 } | 336 } |
| 337 | 337 |
| 338 bool ProxyResolvingClientSocket::UsingTCPFastOpen() const { | 338 bool ProxyResolvingClientSocket::UsingTCPFastOpen() const { |
| 339 if (transport_.get() && transport_->socket()) | 339 if (transport_.get() && transport_->socket()) |
| 340 return transport_->socket()->UsingTCPFastOpen(); | 340 return transport_->socket()->UsingTCPFastOpen(); |
| 341 NOTREACHED(); | 341 NOTREACHED(); |
| 342 return false; | 342 return false; |
| 343 } | 343 } |
| 344 | 344 |
| 345 int64 ProxyResolvingClientSocket::NumBytesRead() const { | |
| 346 if (transport_.get() && transport_->socket()) | |
| 347 return transport_->socket()->NumBytesRead(); | |
| 348 NOTREACHED(); | |
| 349 return -1; | |
| 350 } | |
| 351 | |
| 352 base::TimeDelta ProxyResolvingClientSocket::GetConnectTimeMicros() const { | |
| 353 if (transport_.get() && transport_->socket()) | |
| 354 return transport_->socket()->GetConnectTimeMicros(); | |
| 355 NOTREACHED(); | |
| 356 return base::TimeDelta::FromMicroseconds(-1); | |
| 357 } | |
| 358 | |
| 359 void ProxyResolvingClientSocket::CloseTransportSocket() { | 345 void ProxyResolvingClientSocket::CloseTransportSocket() { |
| 360 if (transport_.get() && transport_->socket()) | 346 if (transport_.get() && transport_->socket()) |
| 361 transport_->socket()->Disconnect(); | 347 transport_->socket()->Disconnect(); |
| 362 transport_.reset(); | 348 transport_.reset(); |
| 363 } | 349 } |
| 364 | 350 |
| 365 } // namespace notifier | 351 } // namespace notifier |
| OLD | NEW |