diff options
author | xunjieli <xunjieli@chromium.org> | 2015-04-29 10:36:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-29 17:36:59 +0000 |
commit | b8a6d56ffe39823af7b09ce6b816d3cd9fbac2a6 (patch) | |
tree | 60e0bafa48d564006038b39606871f82632337b5 /components/cronet/android/url_request_context_adapter.cc | |
parent | e9ac6f320030c764af9dca7f662d2f828c1aa223 (diff) | |
download | chromium_src-b8a6d56ffe39823af7b09ce6b816d3cd9fbac2a6.zip chromium_src-b8a6d56ffe39823af7b09ce6b816d3cd9fbac2a6.tar.gz chromium_src-b8a6d56ffe39823af7b09ce6b816d3cd9fbac2a6.tar.bz2 |
Enable sdch in Cronet
This CL combined rdsmith@'s CL(747453004) and mef@'s
CL(1073193002), and added tests to make sure sdch works for
both the old and the new API.
BUG=414885
Review URL: https://codereview.chromium.org/1085903002
Cr-Commit-Position: refs/heads/master@{#327517}
Diffstat (limited to 'components/cronet/android/url_request_context_adapter.cc')
-rw-r--r-- | components/cronet/android/url_request_context_adapter.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/cronet/android/url_request_context_adapter.cc b/components/cronet/android/url_request_context_adapter.cc index d2adeb4..1524baf 100644 --- a/components/cronet/android/url_request_context_adapter.cc +++ b/components/cronet/android/url_request_context_adapter.cc @@ -23,6 +23,7 @@ #include "net/http/http_server_properties.h" #include "net/log/write_to_file_net_log_observer.h" #include "net/proxy/proxy_service.h" +#include "net/sdch/sdch_owner.h" #include "net/ssl/ssl_config_service_defaults.h" #include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/url_request_context_builder.h" @@ -151,6 +152,12 @@ void URLRequestContextAdapter::InitRequestContextOnNetworkThread() { context_.reset(context_builder.Build()); + if (config_->enable_sdch) { + DCHECK(context_->sdch_manager()); + sdch_owner_.reset( + new net::SdchOwner(context_->sdch_manager(), context_.get())); + } + // Currently (circa M39) enabling QUIC requires setting probability threshold. if (config_->enable_quic) { context_->http_server_properties() |