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

Side by Side Diff: net/url_request/url_request_job_manager.h

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "net/base/net_export.h"
13 #include "net/url_request/url_request.h" 14 #include "net/url_request/url_request.h"
14 15
15 template <typename T> struct DefaultSingletonTraits; 16 template <typename T> struct DefaultSingletonTraits;
16 17
17 namespace net { 18 namespace net {
18 19
19 // This class is responsible for managing the set of protocol factories and 20 // This class is responsible for managing the set of protocol factories and
20 // request interceptors that determine how an URLRequestJob gets created to 21 // request interceptors that determine how an URLRequestJob gets created to
21 // handle an URLRequest. 22 // handle an URLRequest.
22 // 23 //
23 // MULTI-THREADING NOTICE: 24 // MULTI-THREADING NOTICE:
24 // URLRequest is designed to have all consumers on a single thread, and 25 // URLRequest is designed to have all consumers on a single thread, and
25 // so no attempt is made to support Interceptor instances being 26 // so no attempt is made to support Interceptor instances being
26 // registered/unregistered or in any way poked on multiple threads. 27 // registered/unregistered or in any way poked on multiple threads.
27 class URLRequestJobManager { 28 class NET_EXPORT URLRequestJobManager {
28 public: 29 public:
29 // Returns the singleton instance. 30 // Returns the singleton instance.
30 static URLRequestJobManager* GetInstance(); 31 static URLRequestJobManager* GetInstance();
31 32
32 // Instantiate an URLRequestJob implementation based on the registered 33 // Instantiate an URLRequestJob implementation based on the registered
33 // interceptors and protocol factories. This will always succeed in 34 // interceptors and protocol factories. This will always succeed in
34 // returning a job unless we are--in the extreme case--out of memory. 35 // returning a job unless we are--in the extreme case--out of memory.
35 URLRequestJob* CreateJob(URLRequest* request, 36 URLRequestJob* CreateJob(URLRequest* request,
36 NetworkDelegate* network_delegate) const; 37 NetworkDelegate* network_delegate) const;
37 38
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #endif 88 #endif
88 89
89 mutable base::Lock lock_; 90 mutable base::Lock lock_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager); 92 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager);
92 }; 93 };
93 94
94 } // namespace net 95 } // namespace net
95 96
96 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 97 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_simple_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698