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

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

Issue 5607004: net: Remove typedef net::URLRequestJob URLRequestJob; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_job_manager.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) 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_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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/lock.h" 13 #include "base/lock.h"
14 #include "base/platform_thread.h" 14 #include "base/platform_thread.h"
15 #include "net/url_request/url_request.h" 15 #include "net/url_request/url_request.h"
16 16
17 template <typename T> struct DefaultSingletonTraits; 17 template <typename T> struct DefaultSingletonTraits;
18 18
19 // This class is responsible for managing the set of protocol factories and 19 // This class is responsible for managing the set of protocol factories and
20 // request interceptors that determine how an URLRequestJob gets created to 20 // request interceptors that determine how an net::URLRequestJob gets created to
21 // handle an net::URLRequest. 21 // handle an net::URLRequest.
22 // 22 //
23 // MULTI-THREADING NOTICE: 23 // MULTI-THREADING NOTICE:
24 // net::URLRequest is designed to have all consumers on a single thread, and 24 // net::URLRequest is designed to have all consumers on a single thread, and
25 // so no attempt is made to support ProtocolFactory or Interceptor instances 25 // so no attempt is made to support ProtocolFactory or Interceptor instances
26 // being registered/unregistered or in any way poked on multiple threads. 26 // being registered/unregistered or in any way poked on multiple threads.
27 // However, we do support checking for supported schemes FROM ANY THREAD 27 // However, we do support checking for supported schemes FROM ANY THREAD
28 // (i.e., it is safe to call SupportsScheme on any thread). 28 // (i.e., it is safe to call SupportsScheme on any thread).
29 // 29 //
30 class URLRequestJobManager { 30 class URLRequestJobManager {
31 public: 31 public:
32 // Returns the singleton instance. 32 // Returns the singleton instance.
33 static URLRequestJobManager* GetInstance(); 33 static URLRequestJobManager* GetInstance();
34 34
35 // Instantiate an URLRequestJob implementation based on the registered 35 // Instantiate an net::URLRequestJob implementation based on the registered
36 // interceptors and protocol factories. This will always succeed in 36 // interceptors and protocol factories. This will always succeed in
37 // returning a job unless we are--in the extreme case--out of memory. 37 // returning a job unless we are--in the extreme case--out of memory.
38 net::URLRequestJob* CreateJob(net::URLRequest* request) const; 38 net::URLRequestJob* CreateJob(net::URLRequest* request) const;
39 39
40 // Allows interceptors to hijack the request after examining the new location 40 // Allows interceptors to hijack the request after examining the new location
41 // of a redirect. Returns NULL if no interceptor intervenes. 41 // of a redirect. Returns NULL if no interceptor intervenes.
42 net::URLRequestJob* MaybeInterceptRedirect(net::URLRequest* request, 42 net::URLRequestJob* MaybeInterceptRedirect(net::URLRequest* request,
43 const GURL& location) const; 43 const GURL& location) const;
44 44
45 // Allows interceptors to hijack the request after examining the response 45 // Allows interceptors to hijack the request after examining the response
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // check back on. 107 // check back on.
108 return true; 108 return true;
109 #endif 109 #endif
110 } 110 }
111 #endif 111 #endif
112 112
113 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager); 113 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager);
114 }; 114 };
115 115
116 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H__ 116 #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_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698