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

Side by Side Diff: net/socket/client_socket_handle.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
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 "net/socket/client_socket_handle.h" 5 #include "net/socket/client_socket_handle.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 void ClientSocketHandle::HandleInitCompletion(int result) { 158 void ClientSocketHandle::HandleInitCompletion(int result) {
159 CHECK_NE(ERR_IO_PENDING, result); 159 CHECK_NE(ERR_IO_PENDING, result);
160 if (result != OK) { 160 if (result != OK) {
161 if (!socket_.get()) 161 if (!socket_.get())
162 ResetInternal(false); // Nothing to cancel since the request failed. 162 ResetInternal(false); // Nothing to cancel since the request failed.
163 else 163 else
164 is_initialized_ = true; 164 is_initialized_ = true;
165 return; 165 return;
166 } 166 }
167 is_initialized_ = true; 167 is_initialized_ = true;
168 CHECK_NE(-1, pool_id_) << "Pool should have set |pool_id_| to a valid value."; 168 // Pool should have set |pool_id_| to a valid value.
169 CHECK_NE(-1, pool_id_);
169 170
170 // Broadcast that the socket has been acquired. 171 // Broadcast that the socket has been acquired.
171 // TODO(eroman): This logging is not complete, in particular set_socket() and 172 // TODO(eroman): This logging is not complete, in particular set_socket() and
172 // release() socket. It ends up working though, since those methods are being 173 // release() socket. It ends up working though, since those methods are being
173 // used to layer sockets (and the destination sources are the same). 174 // used to layer sockets (and the destination sources are the same).
174 DCHECK(socket_.get()); 175 DCHECK(socket_.get());
175 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE, 176 socket_->NetLog().BeginEvent(NetLogEventType::SOCKET_IN_USE,
176 requesting_source_.ToEventParametersCallback()); 177 requesting_source_.ToEventParametersCallback());
177 } 178 }
178 179
179 } // namespace net 180 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698