Index: net/socket_stream/socket_stream_job_manager.h |
diff --git a/net/socket_stream/socket_stream_job_manager.h b/net/socket_stream/socket_stream_job_manager.h |
index 1150058ccd8aed2f68b5e6b7744d79428e61f7e6..fbd572d6698ea973dd4d4f01893f830abbac5ce5 100644 |
--- a/net/socket_stream/socket_stream_job_manager.h |
+++ b/net/socket_stream/socket_stream_job_manager.h |
@@ -12,14 +12,15 @@ |
#include "net/socket_stream/socket_stream.h" |
#include "net/socket_stream/socket_stream_job.h" |
+template <typename T> struct DefaultSingletonTraits; |
class GURL; |
namespace net { |
class SocketStreamJobManager { |
public: |
- SocketStreamJobManager(); |
- ~SocketStreamJobManager(); |
+ // Returns the singleton instance. |
+ static SocketStreamJobManager* GetInstance(); |
SocketStreamJob* CreateJob( |
const GURL& url, SocketStream::Delegate* delegate) const; |
@@ -28,8 +29,12 @@ class SocketStreamJobManager { |
const std::string& scheme, SocketStreamJob::ProtocolFactory* factory); |
private: |
+ friend struct DefaultSingletonTraits<SocketStreamJobManager>; |
typedef std::map<std::string, SocketStreamJob::ProtocolFactory*> FactoryMap; |
+ SocketStreamJobManager(); |
+ ~SocketStreamJobManager(); |
+ |
mutable Lock lock_; |
FactoryMap factories_; |