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

Side by Side Diff: android_webview/browser/net/fallback_protocol_handler.h

Issue 12377051: [android_webview] Don't intercept resource and asset URLRequests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 ANDROID_WEBVIEW_BROWSER_NET_FALLBACK_PROTOCOL_HANDLER_H_
6 #define ANDROID_WEBVIEW_BROWSER_NET_FALLBACK_PROTOCOL_HANDLER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h"
10 #include "net/url_request/url_request_job_factory.h"
11
12 class GURL;
13
14 namespace net {
15 class URLRequest;
16 class URLRequestJob;
17 class NetworkDelegate;
18 }
19
20 namespace android_webview {
21
22 // This a protocol handler which delegates to a set of protocol handlers at
23 // default priority and <F2>
boliu 2013/03/01 18:44:11 <F2>?
24 class FallbackProtocolHandler :
25 public net::URLRequestJobFactory::ProtocolHandler {
26 public:
27 // The object takes ownership of all of the supplied protocol handlers
28 // (|handlers| will be swapped out with an empty ScopedVector).
29 FallbackProtocolHandler(
30 ScopedVector<net::URLRequestJobFactory::ProtocolHandler>* handlers,
31 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> fallback_handler);
32 virtual ~FallbackProtocolHandler();
33
34 // net::URLRequestJobFactory::ProtocolHandler override -----------------------
35 virtual net::URLRequestJob* MaybeCreateJob(
36 net::URLRequest* request,
37 net::NetworkDelegate* network_delegate) const OVERRIDE;
38
39 private:
40 ScopedVector<net::URLRequestJobFactory::ProtocolHandler> handlers_;
41 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> fallback_handler_;
42
43 DISALLOW_COPY_AND_ASSIGN(FallbackProtocolHandler);
44 };
45
46 } // namespace android_webview
47
48 #endif // ANDROID_WEBVIEW_BROWSER_NET_FALLBACK_PROTOCOL_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698