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

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

Issue 294023015: Hook up request interceptors in AndroidWebView code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 6 years, 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_
6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; 43 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
44 virtual scoped_refptr<base::SingleThreadTaskRunner> 44 virtual scoped_refptr<base::SingleThreadTaskRunner>
45 GetNetworkTaskRunner() const OVERRIDE; 45 GetNetworkTaskRunner() const OVERRIDE;
46 46
47 DataReductionProxyConfigService* proxy_config_service(); 47 DataReductionProxyConfigService* proxy_config_service();
48 48
49 private: 49 private:
50 friend class AwBrowserContext; 50 friend class AwBrowserContext;
51 virtual ~AwURLRequestContextGetter(); 51 virtual ~AwURLRequestContextGetter();
52 52
53 // Prior to GetURLRequestContext() being called, SetProtocolHandlers() is 53 // Prior to GetURLRequestContext() being called, this is called to hand over
54 // called to hand over the ProtocolHandlers that GetURLRequestContext() will 54 // the objects that GetURLRequestContext() will later install into
55 // later install into |job_factory_|. This ordering is enforced by having 55 // |job_factory_|. This ordering is enforced by having
56 // AwBrowserContext::CreateRequestContext() call SetProtocolHandlers(). 56 // AwBrowserContext::CreateRequestContext() call this method.
57 // SetProtocolHandlers() is necessary because the ProtocolHandlers are created 57 // This method is necessary because the passed in objects are created
58 // on the UI thread while |job_factory_| must be created on the IO thread. 58 // on the UI thread while |job_factory_| must be created on the IO thread.
59 void SetProtocolHandlers(content::ProtocolHandlerMap* protocol_handlers); 59 void SetHandlersAndInterceptors(
60 content::ProtocolHandlerMap* protocol_handlers,
61 content::URLRequestInterceptorScopedVector request_interceptors);
60 62
61 void InitializeURLRequestContext(); 63 void InitializeURLRequestContext();
62 64
63 const base::FilePath partition_path_; 65 const base::FilePath partition_path_;
64 scoped_refptr<net::CookieStore> cookie_store_; 66 scoped_refptr<net::CookieStore> cookie_store_;
65 scoped_ptr<net::URLRequestContext> url_request_context_; 67 scoped_ptr<net::URLRequestContext> url_request_context_;
66 scoped_ptr<DataReductionProxyConfigService> proxy_config_service_; 68 scoped_ptr<DataReductionProxyConfigService> proxy_config_service_;
67 scoped_ptr<net::URLRequestJobFactory> job_factory_; 69 scoped_ptr<net::URLRequestJobFactory> job_factory_;
68 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; 70 scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
69 71
70 // ProtocolHandlers are stored here between SetProtocolHandlers() and the 72 // ProtocolHandlers and interceptors are stored here between
71 // first GetURLRequestContext() call. 73 // SetHandlersAndInterceptors() and the first GetURLRequestContext() call.
72 content::ProtocolHandlerMap protocol_handlers_; 74 content::ProtocolHandlerMap protocol_handlers_;
75 content::URLRequestInterceptorScopedVector request_interceptors_;
73 76
74 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); 77 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter);
75 }; 78 };
76 79
77 } // namespace android_webview 80 } // namespace android_webview
78 81
79 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ 82 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_content_browser_client.cc ('k') | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698