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

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

Issue 791493015: Adding q=low to the Chrome-Proxy request header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase test fixes Created 5 years, 10 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
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "content/public/browser/content_browser_client.h" 12 #include "content/public/browser/content_browser_client.h"
13 #include "net/http/http_network_session.h" 13 #include "net/http/http_network_session.h"
14 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
15 #include "net/url_request/url_request_job_factory.h" 15 #include "net/url_request/url_request_job_factory.h"
16 16
17 namespace net { 17 namespace net {
18 class CookieStore; 18 class CookieStore;
19 class HttpTransactionFactory; 19 class HttpTransactionFactory;
20 class NetLog; 20 class NetLog;
21 class ProxyConfigService; 21 class ProxyConfigService;
22 class URLRequestContext; 22 class URLRequestContext;
23 class URLRequestJobFactory; 23 class URLRequestJobFactory;
24 } 24 }
25 25
26 namespace data_reduction_proxy { 26 namespace data_reduction_proxy {
27 class DataReductionProxyAuthRequestHandler; 27 class DataReductionProxyRequestOptions;
28 } 28 }
29 29
30 namespace android_webview { 30 namespace android_webview {
31 31
32 class AwNetworkDelegate; 32 class AwNetworkDelegate;
33 33
34 class AwURLRequestContextGetter : public net::URLRequestContextGetter { 34 class AwURLRequestContextGetter : public net::URLRequestContextGetter {
35 public: 35 public:
36 AwURLRequestContextGetter( 36 AwURLRequestContextGetter(
37 const base::FilePath& cache_path, 37 const base::FilePath& cache_path,
38 net::CookieStore* cookie_store, 38 net::CookieStore* cookie_store,
39 scoped_ptr<net::ProxyConfigService> config_service); 39 scoped_ptr<net::ProxyConfigService> config_service);
40 40
41 // net::URLRequestContextGetter implementation. 41 // net::URLRequestContextGetter implementation.
42 net::URLRequestContext* GetURLRequestContext() override; 42 net::URLRequestContext* GetURLRequestContext() override;
43 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() 43 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
44 const override; 44 const override;
45 45
46 data_reduction_proxy::DataReductionProxyAuthRequestHandler* 46 data_reduction_proxy::DataReductionProxyRequestOptions*
47 GetDataReductionProxyAuthRequestHandler() const; 47 GetDataReductionProxyRequestOptions() const;
48 48
49 // NetLog is thread-safe, so clients can call this method from arbitrary 49 // NetLog is thread-safe, so clients can call this method from arbitrary
50 // threads (UI and IO). 50 // threads (UI and IO).
51 net::NetLog* GetNetLog(); 51 net::NetLog* GetNetLog();
52 52
53 // This should be called before the network stack is ever used. It can be 53 // This should be called before the network stack is ever used. It can be
54 // called again afterwards if the key updates. 54 // called again afterwards if the key updates.
55 void SetKeyOnIO(const std::string& key); 55 void SetKeyOnIO(const std::string& key);
56 56
57 private: 57 private:
(...skipping 10 matching lines...) Expand all
68 content::ProtocolHandlerMap* protocol_handlers, 68 content::ProtocolHandlerMap* protocol_handlers,
69 content::URLRequestInterceptorScopedVector request_interceptors); 69 content::URLRequestInterceptorScopedVector request_interceptors);
70 70
71 void InitializeURLRequestContext(); 71 void InitializeURLRequestContext();
72 72
73 const base::FilePath cache_path_; 73 const base::FilePath cache_path_;
74 scoped_refptr<net::CookieStore> cookie_store_; 74 scoped_refptr<net::CookieStore> cookie_store_;
75 scoped_ptr<net::NetLog> net_log_; 75 scoped_ptr<net::NetLog> net_log_;
76 scoped_ptr<net::URLRequestContext> url_request_context_; 76 scoped_ptr<net::URLRequestContext> url_request_context_;
77 scoped_ptr<net::ProxyConfigService> proxy_config_service_; 77 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
78 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> 78 scoped_ptr<data_reduction_proxy::DataReductionProxyRequestOptions>
79 data_reduction_proxy_auth_request_handler_; 79 data_reduction_proxy_request_options_;
80 scoped_ptr<net::URLRequestJobFactory> job_factory_; 80 scoped_ptr<net::URLRequestJobFactory> job_factory_;
81 scoped_ptr<net::HttpTransactionFactory> main_http_factory_; 81 scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
82 82
83 // ProtocolHandlers and interceptors are stored here between 83 // ProtocolHandlers and interceptors are stored here between
84 // SetHandlersAndInterceptors() and the first GetURLRequestContext() call. 84 // SetHandlersAndInterceptors() and the first GetURLRequestContext() call.
85 content::ProtocolHandlerMap protocol_handlers_; 85 content::ProtocolHandlerMap protocol_handlers_;
86 content::URLRequestInterceptorScopedVector request_interceptors_; 86 content::URLRequestInterceptorScopedVector request_interceptors_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter); 88 DISALLOW_COPY_AND_ASSIGN(AwURLRequestContextGetter);
89 }; 89 };
90 90
91 } // namespace android_webview 91 } // namespace android_webview
92 92
93 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_ 93 #endif // ANDROID_WEBVIEW_BROWSER_NET_AW_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « no previous file | 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