| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "net/base/client_socket_handle.h" | 5 #include "net/socket/client_socket_handle.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "net/base/client_socket.h" | |
| 10 #include "net/base/client_socket_pool.h" | |
| 11 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/socket/client_socket.h" |
| 11 #include "net/socket/client_socket_pool.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 ClientSocketHandle::ClientSocketHandle(ClientSocketPool* pool) | 15 ClientSocketHandle::ClientSocketHandle(ClientSocketPool* pool) |
| 16 : pool_(pool), | 16 : pool_(pool), |
| 17 socket_(NULL), | 17 socket_(NULL), |
| 18 is_reused_(false), | 18 is_reused_(false), |
| 19 ALLOW_THIS_IN_INITIALIZER_LIST( | 19 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 20 callback_(this, &ClientSocketHandle::OnIOComplete)) {} | 20 callback_(this, &ClientSocketHandle::OnIOComplete)) {} |
| 21 | 21 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void ClientSocketHandle::OnIOComplete(int result) { | 64 void ClientSocketHandle::OnIOComplete(int result) { |
| 65 CHECK(ERR_IO_PENDING != result); | 65 CHECK(ERR_IO_PENDING != result); |
| 66 CompletionCallback* callback = user_callback_; | 66 CompletionCallback* callback = user_callback_; |
| 67 user_callback_ = NULL; | 67 user_callback_ = NULL; |
| 68 if (result != OK) | 68 if (result != OK) |
| 69 ResetInternal(false); // The request failed, so there's nothing to cancel. | 69 ResetInternal(false); // The request failed, so there's nothing to cancel. |
| 70 callback->Run(result); | 70 callback->Run(result); |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace net | 73 } // namespace net |
| OLD | NEW |