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

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

Issue 900793009: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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/socks_client_socket_pool.h" 5 #include "net/socket/socks_client_socket_pool.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 case STATE_SOCKS_CONNECT: 69 case STATE_SOCKS_CONNECT:
70 case STATE_SOCKS_CONNECT_COMPLETE: 70 case STATE_SOCKS_CONNECT_COMPLETE:
71 return LOAD_STATE_CONNECTING; 71 return LOAD_STATE_CONNECTING;
72 default: 72 default:
73 NOTREACHED(); 73 NOTREACHED();
74 return LOAD_STATE_IDLE; 74 return LOAD_STATE_IDLE;
75 } 75 }
76 } 76 }
77 77
78 void SOCKSConnectJob::OnIOComplete(int result) { 78 void SOCKSConnectJob::OnIOComplete(int result) {
79 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455884 is fixed.
80 tracked_objects::ScopedTracker tracking_profile(
81 FROM_HERE_WITH_EXPLICIT_FUNCTION("455884 SOCKSConnectJob::OnIOComplete"));
79 int rv = DoLoop(result); 82 int rv = DoLoop(result);
80 if (rv != ERR_IO_PENDING) 83 if (rv != ERR_IO_PENDING)
81 NotifyDelegateOfCompletion(rv); // Deletes |this| 84 NotifyDelegateOfCompletion(rv); // Deletes |this|
82 } 85 }
83 86
84 int SOCKSConnectJob::DoLoop(int result) { 87 int SOCKSConnectJob::DoLoop(int result) {
85 DCHECK_NE(next_state_, STATE_NONE); 88 DCHECK_NE(next_state_, STATE_NONE);
86 89
87 int rv = result; 90 int rv = result;
88 do { 91 do {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 base_.RemoveHigherLayeredPool(higher_pool); 306 base_.RemoveHigherLayeredPool(higher_pool);
304 } 307 }
305 308
306 bool SOCKSClientSocketPool::CloseOneIdleConnection() { 309 bool SOCKSClientSocketPool::CloseOneIdleConnection() {
307 if (base_.CloseOneIdleSocket()) 310 if (base_.CloseOneIdleSocket())
308 return true; 311 return true;
309 return base_.CloseOneIdleConnectionInHigherLayeredPool(); 312 return base_.CloseOneIdleConnectionInHigherLayeredPool();
310 } 313 }
311 314
312 } // namespace net 315 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698