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

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

Issue 6990036: Deciding best connection to schedule requests on based on cwnd and idle time (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Fixing flag name Created 9 years, 6 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
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 DictionaryValue* GetInfoAsValue(const std::string& name, 283 DictionaryValue* GetInfoAsValue(const std::string& name,
284 const std::string& type) const; 284 const std::string& type) const;
285 285
286 base::TimeDelta ConnectionTimeout() const { 286 base::TimeDelta ConnectionTimeout() const {
287 return connect_job_factory_->ConnectionTimeout(); 287 return connect_job_factory_->ConnectionTimeout();
288 } 288 }
289 289
290 static bool connect_backup_jobs_enabled(); 290 static bool connect_backup_jobs_enabled();
291 static bool set_connect_backup_jobs_enabled(bool enabled); 291 static bool set_connect_backup_jobs_enabled(bool enabled);
292 292
293 // Sets the coefficient for decaying the estimate cwnd of a tcp socket.
294 static double set_tcp_socket_estimated_cwnd_decay_coef(double coef);
295
293 void EnableConnectBackupJobs(); 296 void EnableConnectBackupJobs();
294 297
295 // ConnectJob::Delegate methods: 298 // ConnectJob::Delegate methods:
296 virtual void OnConnectJobComplete(int result, ConnectJob* job); 299 virtual void OnConnectJobComplete(int result, ConnectJob* job);
297 300
298 // NetworkChangeNotifier::IPAddressObserver methods: 301 // NetworkChangeNotifier::IPAddressObserver methods:
299 virtual void OnIPAddressChanged(); 302 virtual void OnIPAddressChanged();
300 303
301 private: 304 private:
302 friend class base::RefCounted<ClientSocketPoolBaseHelper>; 305 friend class base::RefCounted<ClientSocketPoolBaseHelper>;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Histograms for the pool 749 // Histograms for the pool
747 ClientSocketPoolHistograms* const histograms_; 750 ClientSocketPoolHistograms* const histograms_;
748 internal::ClientSocketPoolBaseHelper helper_; 751 internal::ClientSocketPoolBaseHelper helper_;
749 752
750 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 753 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
751 }; 754 };
752 755
753 } // namespace net 756 } // namespace net
754 757
755 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 758 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698