Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_ | |
| 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 #include <vector> | |
| 10 #include "base/basictypes.h" | |
| 11 #include "net/base/net_export.h" | |
| 12 #include "net/url_request/url_request_job_factory.h" | |
| 13 | |
| 14 namespace net { | |
| 15 | |
| 16 class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory { | |
| 17 public: | |
| 18 URLRequestJobFactoryImpl(); | |
| 19 virtual ~URLRequestJobFactoryImpl(); | |
| 20 | |
| 21 // URLRequestJobFactory implementation | |
| 22 | |
|
erikwright (departed)
2012/08/22 20:57:35
nit: remove vertical whitespace.
shalev
2012/08/23 15:15:46
Done.
| |
| 23 virtual bool SetProtocolHandler(const std::string& scheme, | |
| 24 ProtocolHandler* protocol_handler) OVERRIDE; | |
| 25 | |
| 26 virtual void AddInterceptor(Interceptor* interceptor); | |
| 27 | |
| 28 virtual URLRequestJob* MaybeCreateJobWithInterceptor( | |
| 29 URLRequest* request) const OVERRIDE; | |
| 30 | |
| 31 virtual URLRequestJob* MaybeCreateJobWithProtocolHandler( | |
| 32 const std::string& scheme, URLRequest* request) const OVERRIDE; | |
| 33 | |
| 34 virtual URLRequestJob* MaybeInterceptRedirect( | |
| 35 const GURL& location, URLRequest* request) const OVERRIDE; | |
| 36 | |
| 37 virtual URLRequestJob* MaybeInterceptResponse( | |
| 38 URLRequest* request) const OVERRIDE; | |
| 39 | |
| 40 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE; | |
| 41 | |
| 42 virtual bool IsHandledURL(const GURL& url) const OVERRIDE; | |
| 43 | |
| 44 private: | |
| 45 typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap; | |
| 46 typedef std::vector<Interceptor*> InterceptorList; | |
| 47 | |
| 48 ProtocolHandlerMap protocol_handler_map_; | |
| 49 InterceptorList interceptors_; | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactoryImpl); | |
| 52 }; | |
| 53 | |
| 54 } // namespace net | |
| 55 | |
| 56 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_ | |
| OLD | NEW |