Chromium Code Reviews| Index: net/url_request/http_intercept_job_factory.h |
| diff --git a/net/url_request/http_intercept_job_factory.h b/net/url_request/http_intercept_job_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8e7d393b9cedb5713edd803880cd0a2f3a97a43b |
| --- /dev/null |
| +++ b/net/url_request/http_intercept_job_factory.h |
| @@ -0,0 +1,54 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_ |
| +#define NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/threading/non_thread_safe.h" |
|
erikwright (departed)
2012/08/16 15:49:01
why is this required?
shalev
2012/08/16 18:40:39
Done.
|
| +#include "net/base/net_export.h" |
| +#include "net/url_request/url_request_job_factory.h" |
| + |
| +class GURL; |
| + |
| +namespace net { |
| + |
| +class URLRequest; |
| +class URLRequestJob; |
| + |
| +class NET_EXPORT HttpInterceptJobFactory : public URLRequestJobFactory { |
|
erikwright (departed)
2012/08/16 15:49:01
class comments required.
shalev
2012/08/16 18:40:39
Done.
|
| + public: |
| + HttpInterceptJobFactory(const URLRequestJobFactory* job_factory, |
| + ProtocolHandler* protocol_handler); |
| + ~HttpInterceptJobFactory(); |
| + |
| + bool SetProtocolHandler(const std::string& scheme, |
|
erikwright (departed)
2012/08/16 15:49:01
These are presumably overrides from URLRequestJobF
shalev
2012/08/16 18:40:39
Done.
|
| + ProtocolHandler* protocol_handler); |
| + |
| + void AddInterceptor(Interceptor* interceptor); |
| + |
| + URLRequestJob* MaybeCreateJobWithInterceptor(URLRequest* request) const; |
| + |
| + URLRequestJob* MaybeCreateJobWithProtocolHandler(const std::string& scheme, |
| + URLRequest* request) const; |
| + |
| + URLRequestJob* MaybeInterceptRedirect(const GURL& location, |
| + URLRequest* request) const; |
| + |
| + URLRequestJob* MaybeInterceptResponse(URLRequest* request) const; |
| + |
| + bool IsHandledProtocol(const std::string& scheme) const; |
| + |
| + bool IsHandledURL(const GURL& url) const; |
| + |
| + private: |
| + const URLRequestJobFactory* job_factory_; |
| + ProtocolHandler* protocol_handler_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(HttpInterceptJobFactory); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_ |