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

Unified Diff: net/socket_stream/socket_stream_job_manager.h

Issue 5634005: Add a new GetInstance() method for singleton classes under chrome/service and /net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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_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..5ab85de07bd1a45290b4b4a063d29933968d4e9f 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"
#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,6 +29,10 @@ class SocketStreamJobManager {
const std::string& scheme, SocketStreamJob::ProtocolFactory* factory);
private:
+ SocketStreamJobManager();
+ ~SocketStreamJobManager();
+
+ friend struct DefaultSingletonTraits<SocketStreamJobManager>;
typedef std::map<std::string, SocketStreamJob::ProtocolFactory*> FactoryMap;
willchan no longer on Chromium 2010/12/08 00:58:46 Types go before function declarations (including c
Satish 2010/12/08 12:58:22 Done.
mutable Lock lock_;

Powered by Google App Engine
This is Rietveld 408576698