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

Side by Side Diff: net/url_request/url_request_interceptor.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2014 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_INTERCEPTOR_H_
6 #define NET_URL_REQUEST_URL_REQUEST_INTERCEPTOR_H_
7
8 #include "base/macros.h"
9 #include "net/base/net_export.h"
10
11 class GURL;
12
13 namespace net {
14
15 class URLRequest;
16 class URLRequestJob;
17 class NetworkDelegate;
18
19 // A URLRequestInterceptor is given a chance to create a URLRequestJob to
20 // handle URLRequests before they're handed off to the ProtocolHandler for
21 // the request's scheme.
22 class NET_EXPORT URLRequestInterceptor {
23 public:
24 URLRequestInterceptor();
25 virtual ~URLRequestInterceptor();
26
27 // Returns a URLRequestJob to handle |request|, if the interceptor wants to
28 // take over the handling the request instead of the default ProtocolHandler.
29 // Otherwise, returns NULL.
30 virtual URLRequestJob* MaybeInterceptRequest(
31 URLRequest* request, NetworkDelegate* network_delegate) const = 0;
32
33 // Returns a URLRequestJob to handle |request|, if the interceptor wants to
34 // take over the handling of the request after a redirect is received,
35 // instead of using the default ProtocolHandler. Otherwise, returns NULL.
36 virtual URLRequestJob* MaybeInterceptRedirect(
37 URLRequest* request,
38 NetworkDelegate* network_delegate,
39 const GURL& location) const;
40
41 // Returns a URLRequestJob to handle |request, if the interceptor wants to
42 // take over the handling of the request after a response has started,
43 // instead of using the default ProtocolHandler. Otherwise, returns NULL.
44 virtual URLRequestJob* MaybeInterceptResponse(
45 URLRequest* request, NetworkDelegate* network_delegate) const;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptor);
49 };
50
51 } // namespace net
52
53 #endif // NET_URL_REQUEST_URL_REQUEST_INTERCEPTOR_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_intercepting_job_factory.cc ('k') | net/url_request/url_request_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698