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..2eccdf4a5cacfb76dbcd5df96a806008db37fcae 100644 |
--- a/net/socket_stream/socket_stream_job_manager.h |
+++ b/net/socket_stream/socket_stream_job_manager.h |
@@ -9,6 +9,7 @@ |
#include <map> |
#include <string> |
+#include "base/singleton.h" |
willchan no longer on Chromium
2010/12/08 18:09:41
As joth mentioned in another code review, I think
Satish
2010/12/08 22:06:40
Done.
|
#include "net/socket_stream/socket_stream.h" |
#include "net/socket_stream/socket_stream_job.h" |
@@ -18,8 +19,8 @@ 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_; |