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

Unified Diff: net/socket/client_socket_pool_base.h

Issue 2104013: Revert r47395. Looks like it still crashes =/ (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.h
diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h
index 55ce7f7094dfa72ebc47e56252fd706a4b23e81d..89bdb78e8ed5e7f47d2c6e14b48ad9fe50c9220f 100644
--- a/net/socket/client_socket_pool_base.h
+++ b/net/socket/client_socket_pool_base.h
@@ -39,6 +39,7 @@
#include "net/base/load_states.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
+#include "net/base/network_change_notifier.h"
#include "net/base/request_priority.h"
#include "net/socket/client_socket.h"
#include "net/socket/client_socket_pool.h"
@@ -123,7 +124,8 @@ namespace internal {
// ClientSocketPoolBase instead.
class ClientSocketPoolBaseHelper
: public base::RefCounted<ClientSocketPoolBaseHelper>,
- public ConnectJob::Delegate {
+ public ConnectJob::Delegate,
+ public NetworkChangeNotifier::Observer {
public:
class Request {
public:
@@ -170,7 +172,8 @@ class ClientSocketPoolBaseHelper
int max_sockets_per_group,
base::TimeDelta unused_idle_socket_timeout,
base::TimeDelta used_idle_socket_timeout,
- ConnectJobFactory* connect_job_factory);
+ ConnectJobFactory* connect_job_factory,
+ NetworkChangeNotifier* network_change_notifier);
// See ClientSocketPool::RequestSocket for documentation on this function.
// ClientSocketPoolBaseHelper takes ownership of |request|, which must be
@@ -210,6 +213,9 @@ class ClientSocketPoolBaseHelper
// ConnectJob::Delegate methods:
virtual void OnConnectJobComplete(int result, ConnectJob* job);
+ // NetworkChangeNotifier::Observer methods:
+ virtual void OnIPAddressChanged();
+
// For testing.
bool may_have_stalled_group() const { return may_have_stalled_group_; }
@@ -433,6 +439,8 @@ class ClientSocketPoolBaseHelper
const scoped_ptr<ConnectJobFactory> connect_job_factory_;
+ NetworkChangeNotifier* const network_change_notifier_;
+
// TODO(vandebo) Remove when backup jobs move to TCPClientSocketPool
bool backup_jobs_enabled_;
@@ -499,12 +507,14 @@ class ClientSocketPoolBase {
const std::string& name,
base::TimeDelta unused_idle_socket_timeout,
base::TimeDelta used_idle_socket_timeout,
- ConnectJobFactory* connect_job_factory)
+ ConnectJobFactory* connect_job_factory,
+ NetworkChangeNotifier* network_change_notifier)
: name_(name),
helper_(new internal::ClientSocketPoolBaseHelper(
max_sockets, max_sockets_per_group,
unused_idle_socket_timeout, used_idle_socket_timeout,
- new ConnectJobFactoryAdaptor(connect_job_factory))) {}
+ new ConnectJobFactoryAdaptor(connect_job_factory),
+ network_change_notifier)) {}
virtual ~ClientSocketPoolBase() {}
« no previous file with comments | « net/net.gyp ('k') | net/socket/client_socket_pool_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698