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

Unified Diff: net/socket/ssl_client_socket_pool.h

Issue 364943002: Makes waiting SSLConnectJobs use the message loops to resume their connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed use after free bug & other cl comments. Created 6 years, 5 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
Index: net/socket/ssl_client_socket_pool.h
diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h
index b4116fd8a376a20fb261259dc86dc28b836fc41d..a916f76ded690bf1f67972c7c4aadd1d3c702752 100644
--- a/net/socket/ssl_client_socket_pool.h
+++ b/net/socket/ssl_client_socket_pool.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/thread_task_runner_handle.h"
mmenke 2014/07/22 18:06:32 nit: I don't believe this is needed here.
mshelley 2014/07/23 22:09:07 Done.
#include "base/time/time.h"
#include "net/base/privacy_mode.h"
#include "net/dns/host_resolver.h"
@@ -115,6 +116,8 @@ class NET_EXPORT_PRIVATE SSLConnectJobMessenger {
typedef std::vector<SocketAndCallback> SSLPendingSocketsAndCallbacks;
+ SSLConnectJobMessenger();
+
// Removes |socket| from |connecting_sockets_| or
// |pending_sockets_and_callbacks_|
// if it is present in either.
@@ -157,6 +160,8 @@ class NET_EXPORT_PRIVATE SSLConnectJobMessenger {
// Note: this field is a vector to allow for future design changes. Currently,
// this vector should only ever have one entry.
std::vector<SSLClientSocket*> connecting_sockets_;
+
+ base::WeakPtrFactory<SSLConnectJobMessenger> weak_factory_;
};
// SSLConnectJob handles the SSL handshake after setting up the underlying

Powered by Google App Engine
This is Rietveld 408576698