OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FACTORY_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 // Takes ownership of |interceptor|. Adds it to the end of the Interceptor | 80 // Takes ownership of |interceptor|. Adds it to the end of the Interceptor |
81 // list. | 81 // list. |
82 void AddInterceptor(Interceptor* interceptor); | 82 void AddInterceptor(Interceptor* interceptor); |
83 | 83 |
84 URLRequestJob* MaybeCreateJobWithInterceptor(URLRequest* request) const; | 84 URLRequestJob* MaybeCreateJobWithInterceptor(URLRequest* request) const; |
85 | 85 |
86 URLRequestJob* MaybeCreateJobWithProtocolHandler(const std::string& scheme, | 86 URLRequestJob* MaybeCreateJobWithProtocolHandler(const std::string& scheme, |
87 URLRequest* request) const; | 87 URLRequest* request) const; |
88 | 88 |
| 89 URLRequestJob* MaybeInterceptRedirect(const GURL& location, |
| 90 URLRequest* request) const; |
| 91 |
| 92 URLRequestJob* MaybeInterceptResponse(URLRequest* request) const; |
| 93 |
89 bool IsHandledProtocol(const std::string& scheme) const; | 94 bool IsHandledProtocol(const std::string& scheme) const; |
90 | 95 |
91 bool IsHandledURL(const GURL& url) const; | 96 bool IsHandledURL(const GURL& url) const; |
92 | 97 |
93 private: | 98 private: |
94 typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap; | 99 typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap; |
95 typedef std::vector<Interceptor*> InterceptorList; | 100 typedef std::vector<Interceptor*> InterceptorList; |
96 | 101 |
97 ProtocolHandlerMap protocol_handler_map_; | 102 ProtocolHandlerMap protocol_handler_map_; |
98 InterceptorList interceptors_; | 103 InterceptorList interceptors_; |
99 | 104 |
100 DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactory); | 105 DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactory); |
101 }; | 106 }; |
102 | 107 |
103 } // namespace net | 108 } // namespace net |
104 | 109 |
105 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_H_ | 110 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_H_ |
OLD | NEW |