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

Side by Side Diff: net/url_request/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: Cleaned up, responded to suggestions 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 NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_
6 #define NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_
7
8 #include "base/basictypes.h"
mmenke 2012/08/16 19:12:11 #include "base/compiler_specific.h" for OVERRIDE,
shalev 2012/08/22 19:10:11 Done.
9 #include "net/base/net_export.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 NET_EXPORT HttpInterceptJobFactory : public URLRequestJobFactory {
23 public:
24 HttpInterceptJobFactory(const URLRequestJobFactory* job_factory,
25 ProtocolHandler* protocol_handler);
26 ~HttpInterceptJobFactory();
mmenke 2012/08/16 19:12:11 Destructor should be virtual
shalev 2012/08/22 19:10:11 Done.
27
28 // URLRequestJobFactory implementation
29
30 bool SetProtocolHandler(const std::string& scheme,
willchan no longer on Chromium 2012/08/16 20:35:37 Everything that is overridden should include "virt
shalev 2012/08/22 19:10:11 Done.
31 ProtocolHandler* protocol_handler) OVERRIDE;
32
33 void AddInterceptor(Interceptor* interceptor) OVERRIDE;
34
35 URLRequestJob* MaybeCreateJobWithInterceptor(
36 URLRequest* request) const OVERRIDE;
37
38 URLRequestJob* MaybeCreateJobWithProtocolHandler(
39 const std::string& scheme, URLRequest* request) const OVERRIDE;
40
41 URLRequestJob* MaybeInterceptRedirect(
42 const GURL& location, URLRequest* request) const OVERRIDE;
43
44 URLRequestJob* MaybeInterceptResponse(URLRequest* request) const OVERRIDE;
45
46 bool IsHandledProtocol(const std::string& scheme) const OVERRIDE;
47
48 bool IsHandledURL(const GURL& url) const OVERRIDE;
mmenke 2012/08/16 19:12:11 These should all be virtual
shalev 2012/08/22 19:10:11 Done.
49
50 private:
51 const URLRequestJobFactory* job_factory_;
52 ProtocolHandler* protocol_handler_;
53
54 DISALLOW_COPY_AND_ASSIGN(HttpInterceptJobFactory);
55 };
56
57 } // namespace net
58
59 #endif // NET_URL_REQUEST_HTTP_INTERCEPT_JOB_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698