OLD | NEW |
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_pool_base.h" | 5 #include "net/socket/client_socket_pool_base.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/metrics/stats_counters.h" | 11 #include "base/metrics/stats_counters.h" |
| 12 #include "base/profiler/scoped_tracker.h" |
12 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
13 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
17 #include "net/base/net_log.h" | 18 #include "net/base/net_log.h" |
18 | 19 |
19 using base::TimeDelta; | 20 using base::TimeDelta; |
20 | 21 |
21 namespace net { | 22 namespace net { |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 *group = top_group; | 859 *group = top_group; |
859 *group_name = *top_group_name; | 860 *group_name = *top_group_name; |
860 } else { | 861 } else { |
861 CHECK(!has_stalled_group); | 862 CHECK(!has_stalled_group); |
862 } | 863 } |
863 return has_stalled_group; | 864 return has_stalled_group; |
864 } | 865 } |
865 | 866 |
866 void ClientSocketPoolBaseHelper::OnConnectJobComplete( | 867 void ClientSocketPoolBaseHelper::OnConnectJobComplete( |
867 int result, ConnectJob* job) { | 868 int result, ConnectJob* job) { |
| 869 // TODO(vadimt): Remove ScopedTracker below once crbug.com/436634 is fixed. |
| 870 tracked_objects::ScopedTracker tracking_profile( |
| 871 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 872 "436634 ClientSocketPoolBaseHelper::OnConnectJobComplete")); |
| 873 |
868 DCHECK_NE(ERR_IO_PENDING, result); | 874 DCHECK_NE(ERR_IO_PENDING, result); |
869 const std::string group_name = job->group_name(); | 875 const std::string group_name = job->group_name(); |
870 GroupMap::iterator group_it = group_map_.find(group_name); | 876 GroupMap::iterator group_it = group_map_.find(group_name); |
871 CHECK(group_it != group_map_.end()); | 877 CHECK(group_it != group_map_.end()); |
872 Group* group = group_it->second; | 878 Group* group = group_it->second; |
873 | 879 |
874 scoped_ptr<StreamSocket> socket = job->PassSocket(); | 880 scoped_ptr<StreamSocket> socket = job->PassSocket(); |
875 | 881 |
876 // Copies of these are needed because |job| may be deleted before they are | 882 // Copies of these are needed because |job| may be deleted before they are |
877 // accessed. | 883 // accessed. |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 pending_requests_.Erase(pointer); | 1328 pending_requests_.Erase(pointer); |
1323 // If there are no more requests, kill the backup timer. | 1329 // If there are no more requests, kill the backup timer. |
1324 if (pending_requests_.empty()) | 1330 if (pending_requests_.empty()) |
1325 backup_job_timer_.Stop(); | 1331 backup_job_timer_.Stop(); |
1326 return request.Pass(); | 1332 return request.Pass(); |
1327 } | 1333 } |
1328 | 1334 |
1329 } // namespace internal | 1335 } // namespace internal |
1330 | 1336 |
1331 } // namespace net | 1337 } // namespace net |
OLD | NEW |