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

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

Issue 6684019: Reland rest of r77399. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/client_socket_pool_base.h ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/stats_counters.h" 10 #include "base/metrics/stats_counters.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 629
630 RemoveGroup(it); 630 RemoveGroup(it);
631 } 631 }
632 632
633 void ClientSocketPoolBaseHelper::RemoveGroup(GroupMap::iterator it) { 633 void ClientSocketPoolBaseHelper::RemoveGroup(GroupMap::iterator it) {
634 delete it->second; 634 delete it->second;
635 group_map_.erase(it); 635 group_map_.erase(it);
636 } 636 }
637 637
638 // static 638 // static
639 bool ClientSocketPoolBaseHelper::connect_backup_jobs_enabled() {
640 return g_connect_backup_jobs_enabled;
641 }
642
643 // static
639 void ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(bool enabled) { 644 void ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled(bool enabled) {
640 g_connect_backup_jobs_enabled = enabled; 645 g_connect_backup_jobs_enabled = enabled;
641 } 646 }
642 647
643 void ClientSocketPoolBaseHelper::EnableConnectBackupJobs() { 648 void ClientSocketPoolBaseHelper::EnableConnectBackupJobs() {
644 connect_backup_jobs_enabled_ = g_connect_backup_jobs_enabled; 649 connect_backup_jobs_enabled_ = g_connect_backup_jobs_enabled;
645 } 650 }
646 651
647 void ClientSocketPoolBaseHelper::IncrementIdleCount() { 652 void ClientSocketPoolBaseHelper::IncrementIdleCount() {
648 if (++idle_socket_count_ == 1) 653 if (++idle_socket_count_ == 1)
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 // Delete active jobs. 1078 // Delete active jobs.
1074 STLDeleteElements(&jobs_); 1079 STLDeleteElements(&jobs_);
1075 1080
1076 // Cancel pending backup job. 1081 // Cancel pending backup job.
1077 method_factory_.RevokeAll(); 1082 method_factory_.RevokeAll();
1078 } 1083 }
1079 1084
1080 } // namespace internal 1085 } // namespace internal
1081 1086
1082 } // namespace net 1087 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.h ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698