diff options
Diffstat (limited to 'net/socket_stream/socket_stream_job_manager.h')
-rw-r--r-- | net/socket_stream/socket_stream_job_manager.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/socket_stream/socket_stream_job_manager.h b/net/socket_stream/socket_stream_job_manager.h index 1150058..fbd572d 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_; |