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

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

Issue 8568021: Add OVERRIDE to net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net only Created 9 years, 1 month 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/server/http_server.h ('k') | net/socket/client_socket_pool_manager.h » ('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) 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 base::TimeDelta ConnectionTimeout() const { 304 base::TimeDelta ConnectionTimeout() const {
305 return connect_job_factory_->ConnectionTimeout(); 305 return connect_job_factory_->ConnectionTimeout();
306 } 306 }
307 307
308 static bool connect_backup_jobs_enabled(); 308 static bool connect_backup_jobs_enabled();
309 static bool set_connect_backup_jobs_enabled(bool enabled); 309 static bool set_connect_backup_jobs_enabled(bool enabled);
310 310
311 void EnableConnectBackupJobs(); 311 void EnableConnectBackupJobs();
312 312
313 // ConnectJob::Delegate methods: 313 // ConnectJob::Delegate methods:
314 virtual void OnConnectJobComplete(int result, ConnectJob* job); 314 virtual void OnConnectJobComplete(int result, ConnectJob* job) OVERRIDE;
315 315
316 // NetworkChangeNotifier::IPAddressObserver methods: 316 // NetworkChangeNotifier::IPAddressObserver methods:
317 virtual void OnIPAddressChanged(); 317 virtual void OnIPAddressChanged() OVERRIDE;
318 318
319 private: 319 private:
320 friend class base::RefCounted<ClientSocketPoolBaseHelper>; 320 friend class base::RefCounted<ClientSocketPoolBaseHelper>;
321 321
322 // Entry for a persistent socket which became idle at time |start_time|. 322 // Entry for a persistent socket which became idle at time |start_time|.
323 struct IdleSocket { 323 struct IdleSocket {
324 IdleSocket() : socket(NULL) {} 324 IdleSocket() : socket(NULL) {}
325 325
326 // An idle socket should be removed if it can't be reused, or has been idle 326 // An idle socket should be removed if it can't be reused, or has been idle
327 // for too long. |now| is the current time value (TimeTicks::Now()). 327 // for too long. |now| is the current time value (TimeTicks::Now()).
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 // Histograms for the pool 761 // Histograms for the pool
762 ClientSocketPoolHistograms* const histograms_; 762 ClientSocketPoolHistograms* const histograms_;
763 internal::ClientSocketPoolBaseHelper helper_; 763 internal::ClientSocketPoolBaseHelper helper_;
764 764
765 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase); 765 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolBase);
766 }; 766 };
767 767
768 } // namespace net 768 } // namespace net
769 769
770 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_ 770 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_BASE_H_
OLDNEW
« no previous file with comments | « net/server/http_server.h ('k') | net/socket/client_socket_pool_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698