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

Side by Side Diff: chrome/browser/net/http_intercept_job_factory.h

Issue 10836248: Turned job_factory into a pure virtual class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 4 months 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
OLDNEW
(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 CHROME_BROWSER_NET_HTTP_INTERCEPT_JOB_FACTORY_H_
6 #define CHROME_BROWSER_NET_HTTP_INTERCEPT_JOB_FACTORY_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "net/url_request/url_request_job_factory.h"
11
12 class GURL;
13
14 namespace net {
15
16 class URLRequest;
17 class URLRequestJob;
18
19 // This class acts as a wrapper for URLRequestJobFactory. It handles HTTP and
20 // HTTPS jobs using |protocol_handler_|, but forwards all other schemes to the
21 // old job factory to be handled there.
22 class HttpInterceptJobFactory : public URLRequestJobFactory {
23 public:
24 HttpInterceptJobFactory(const URLRequestJobFactory* job_factory,
25 ProtocolHandler* protocol_handler);
26 virtual ~HttpInterceptJobFactory();
27
28 // URLRequestJobFactory implementation
29 virtual bool SetProtocolHandler(const std::string& scheme,
30 ProtocolHandler* protocol_handler) OVERRIDE;
mmenke 2012/08/23 15:00:21 nit: Fix indent.
shalev 2012/08/23 15:15:46 Done.
31 virtual void AddInterceptor(Interceptor* interceptor) OVERRIDE;
32 virtual URLRequestJob* MaybeCreateJobWithInterceptor(
33 URLRequest* request) const OVERRIDE;
34 virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
35 const std::string& scheme, URLRequest* request) const OVERRIDE;
36 virtual URLRequestJob* MaybeInterceptRedirect(
37 const GURL& location, URLRequest* request) const OVERRIDE;
38 virtual URLRequestJob* MaybeInterceptResponse(
39 URLRequest* request) const OVERRIDE;
40 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE;
41 virtual bool IsHandledURL(const GURL& url) const OVERRIDE;
42
43 private:
44 const URLRequestJobFactory* job_factory_;
45 ProtocolHandler* protocol_handler_;
46
47 DISALLOW_COPY_AND_ASSIGN(HttpInterceptJobFactory);
48 };
49
50 } // namespace net
51
52 #endif // CHROME_BROWSER_NET_HTTP_INTERCEPT_JOB_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698