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

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

Issue 8991001: base::Bind: Convert most of webkit/appcache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang fix. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A ClientSocketPoolBase is used to restrict the number of sockets open at 5 // A ClientSocketPoolBase is used to restrict the number of sockets open at
6 // a time. It also maintains a list of idle persistent sockets for reuse. 6 // a time. It also maintains a list of idle persistent sockets for reuse.
7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle 7 // Subclasses of ClientSocketPool should compose ClientSocketPoolBase to handle
8 // the core logic of (1) restricting the number of active (connected or 8 // the core logic of (1) restricting the number of active (connected or
9 // connecting) sockets per "group" (generally speaking, the hostname), (2) 9 // connecting) sockets per "group" (generally speaking, the hostname), (2)
10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3) 10 // maintaining a per-group list of idle, persistent sockets for reuse, and (3)
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 }; 442 };
443 443
444 typedef std::map<std::string, Group*> GroupMap; 444 typedef std::map<std::string, Group*> GroupMap;
445 445
446 typedef std::set<ConnectJob*> ConnectJobSet; 446 typedef std::set<ConnectJob*> ConnectJobSet;
447 447
448 struct CallbackResultPair { 448 struct CallbackResultPair {
449 CallbackResultPair() : result(OK) {} 449 CallbackResultPair() : result(OK) {}
450 CallbackResultPair(const CompletionCallback& callback_in, int result_in) 450 CallbackResultPair(const CompletionCallback& callback_in, int result_in)
451 : callback(callback_in), result(result_in) {} 451 : callback(callback_in), result(result_in) {}
452 ~CallbackResultPair();
452 453
453 CompletionCallback callback; 454 CompletionCallback callback;
454 int result; 455 int result;
455 }; 456 };
456 457
457 typedef std::map<const ClientSocketHandle*, CallbackResultPair> 458 typedef std::map<const ClientSocketHandle*, CallbackResultPair>
458 PendingCallbackMap; 459 PendingCallbackMap;
459 460
460 static void InsertRequestIntoQueue(const Request* r, 461 static void InsertRequestIntoQueue(const Request* r,
461 RequestQueue* pending_requests); 462 RequestQueue* pending_requests);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 // Histograms for the pool 806 // Histograms for the pool
806 ClientSocketPoolHistograms* const histograms_; 807 ClientSocketPoolHistograms* const histograms_;
807 internal::ClientSocketPoolBaseHelper helper_; 808 internal::ClientSocketPoolBaseHelper helper_;
808 809
809 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 810 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
810 }; 811 };
811 812
812 } // namespace net 813 } // namespace net
813 814
814 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 815 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | net/socket/client_socket_pool_base.cc » ('j') | webkit/appcache/appcache_request_handler_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698