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

Side by Side Diff: trunk/src/net/socket_stream/socket_stream_job_manager.h

Issue 197463003: Revert 256579 "Allow the content browser client to specify a spe..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "net/socket_stream/socket_stream.h" 11 #include "net/socket_stream/socket_stream.h"
12 #include "net/socket_stream/socket_stream_job.h" 12 #include "net/socket_stream/socket_stream_job.h"
13 13
14 template <typename T> struct DefaultSingletonTraits; 14 template <typename T> struct DefaultSingletonTraits;
15 class GURL; 15 class GURL;
16 16
17 namespace net { 17 namespace net {
18 18
19 class SocketStreamJobManager { 19 class SocketStreamJobManager {
20 public: 20 public:
21 // Returns the singleton instance. 21 // Returns the singleton instance.
22 static SocketStreamJobManager* GetInstance(); 22 static SocketStreamJobManager* GetInstance();
23 23
24 SocketStreamJob* CreateJob( 24 SocketStreamJob* CreateJob(
25 const GURL& url, SocketStream::Delegate* delegate, 25 const GURL& url, SocketStream::Delegate* delegate) const;
26 URLRequestContext* context, CookieStore* cookie_store) const;
27 26
28 SocketStreamJob::ProtocolFactory* RegisterProtocolFactory( 27 SocketStreamJob::ProtocolFactory* RegisterProtocolFactory(
29 const std::string& scheme, SocketStreamJob::ProtocolFactory* factory); 28 const std::string& scheme, SocketStreamJob::ProtocolFactory* factory);
30 29
31 private: 30 private:
32 friend struct DefaultSingletonTraits<SocketStreamJobManager>; 31 friend struct DefaultSingletonTraits<SocketStreamJobManager>;
33 typedef std::map<std::string, SocketStreamJob::ProtocolFactory*> FactoryMap; 32 typedef std::map<std::string, SocketStreamJob::ProtocolFactory*> FactoryMap;
34 33
35 SocketStreamJobManager(); 34 SocketStreamJobManager();
36 ~SocketStreamJobManager(); 35 ~SocketStreamJobManager();
37 36
38 mutable base::Lock lock_; 37 mutable base::Lock lock_;
39 FactoryMap factories_; 38 FactoryMap factories_;
40 39
41 DISALLOW_COPY_AND_ASSIGN(SocketStreamJobManager); 40 DISALLOW_COPY_AND_ASSIGN(SocketStreamJobManager);
42 }; 41 };
43 42
44 } // namespace net 43 } // namespace net
45 44
46 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_ 45 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_MANAGER_H_
OLDNEW
« no previous file with comments | « trunk/src/net/socket_stream/socket_stream_job.cc ('k') | trunk/src/net/socket_stream/socket_stream_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698