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/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: '' 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // See ClientSocketPool::GetInfoAsValue for documentation on this function. 282 // See ClientSocketPool::GetInfoAsValue for documentation on this function.
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 static double set_bytes_read_vs_last_accessed_alpha(double alpha);
wtc 2011/06/06 17:24:05 Please document this method. (I don't know what "
Gagan 2011/06/08 16:26:37 renamed to tcp_socket_estimated_cwnd_decay_coef an
292 293
293 void EnableConnectBackupJobs(); 294 void EnableConnectBackupJobs();
294 295
295 // ConnectJob::Delegate methods: 296 // ConnectJob::Delegate methods:
296 virtual void OnConnectJobComplete(int result, ConnectJob* job); 297 virtual void OnConnectJobComplete(int result, ConnectJob* job);
297 298
298 // NetworkChangeNotifier::IPAddressObserver methods: 299 // NetworkChangeNotifier::IPAddressObserver methods:
299 virtual void OnIPAddressChanged(); 300 virtual void OnIPAddressChanged();
300 301
301 private: 302 private:
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // Histograms for the pool 747 // Histograms for the pool
747 ClientSocketPoolHistograms* const histograms_; 748 ClientSocketPoolHistograms* const histograms_;
748 internal::ClientSocketPoolBaseHelper helper_; 749 internal::ClientSocketPoolBaseHelper helper_;
749 750
750 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 751 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
751 }; 752 };
752 753
753 } // namespace net 754 } // namespace net
754 755
755 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 756 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698