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

Unified Diff: net/url_request/url_request_context_builder.h

Issue 1725123005: Passing in a Data Reduction Proxy Delegate from Cronet with Data Reduction Proxy Enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a comment Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_context_builder.h
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index 7feb01c03bce947c43dd6c6e5b5e90d7d95d7e44..1ee73b6f92f6d96bc94321c93b178366fe6c1777 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -19,20 +19,21 @@
#include <unordered_map>
#include <utility>
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "net/base/net_export.h"
#include "net/base/network_delegate.h"
+#include "net/base/proxy_delegate.h"
#include "net/dns/host_resolver.h"
#include "net/http/http_network_session.h"
#include "net/proxy/proxy_config_service.h"
#include "net/proxy/proxy_service.h"
#include "net/quic/quic_protocol.h"
#include "net/socket/next_proto.h"
namespace base {
class SingleThreadTaskRunner;
}
@@ -164,20 +165,26 @@ class NET_EXPORT URLRequestContextBuilder {
host_resolver_ = std::move(host_resolver);
}
// Uses BasicNetworkDelegate by default. Note that calling Build will unset
// any custom delegate in builder, so this must be called each time before
// Build is called.
void set_network_delegate(scoped_ptr<NetworkDelegate> delegate) {
network_delegate_ = std::move(delegate);
}
+ // Temporarily stores a ProxyDelegate. Ownership is transferred to
+ // UrlRequestContextStorage during Build.
+ void set_proxy_delegate(scoped_ptr<ProxyDelegate> delegate) {
+ proxy_delegate_ = std::move(delegate);
+ }
+
// Sets a specific HttpAuthHandlerFactory to be used by the URLRequestContext
// rather than the default |HttpAuthHandlerRegistryFactory|. The builder
// takes ownership of the factory and will eventually transfer it to the new
// URLRequestContext. Note that since Build will transfer ownership, the
// custom factory will be unset and this must be called before the next Build
// to set another custom one.
void SetHttpAuthHandlerFactory(scoped_ptr<HttpAuthHandlerFactory> factory);
// By default HttpCache is enabled with a default constructed HttpCacheParams.
void EnableHttpCache(const HttpCacheParams& params);
@@ -324,20 +331,21 @@ class NET_EXPORT URLRequestContextBuilder {
scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
HttpCacheParams http_cache_params_;
HttpNetworkSessionParams http_network_session_params_;
base::FilePath transport_security_persister_path_;
NetLog* net_log_;
scoped_ptr<HostResolver> host_resolver_;
scoped_ptr<ChannelIDService> channel_id_service_;
scoped_ptr<ProxyConfigService> proxy_config_service_;
scoped_ptr<ProxyService> proxy_service_;
scoped_ptr<NetworkDelegate> network_delegate_;
+ scoped_ptr<ProxyDelegate> proxy_delegate_;
scoped_refptr<CookieStore> cookie_store_;
scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_;
scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_;
scoped_ptr<CertVerifier> cert_verifier_;
std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors_;
scoped_ptr<HttpServerProperties> http_server_properties_;
DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
};
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698