Chromium Code Reviews| Index: components/cronet/ios/cronet_environment.mm |
| diff --git a/components/cronet/ios/cronet_environment.cc b/components/cronet/ios/cronet_environment.mm |
| similarity index 97% |
| rename from components/cronet/ios/cronet_environment.cc |
| rename to components/cronet/ios/cronet_environment.mm |
| index f136118a789f40eb110fc0e6b52d33c3a05b8c79..101e1f4db64ca8b5a470571b7999ed2d96389537 100644 |
| --- a/components/cronet/ios/cronet_environment.cc |
| +++ b/components/cronet/ios/cronet_environment.mm |
| @@ -27,6 +27,7 @@ |
| #include "components/cronet/ios/version.h" |
| #include "components/prefs/json_pref_store.h" |
| #include "components/prefs/pref_filter.h" |
| +#include "ios/net/cookies/cookie_store_ios.h" |
| #include "ios/web/public/user_agent.h" |
| #include "net/base/net_errors.h" |
| #include "net/base/network_change_notifier.h" |
| @@ -36,6 +37,7 @@ |
| #include "net/cert/ct_policy_enforcer.h" |
| #include "net/cert/ct_verifier.h" |
| #include "net/cert/multi_log_ct_verifier.h" |
| +#include "net/cookies/cookie_store.h" |
| #include "net/dns/host_resolver.h" |
| #include "net/dns/mapped_host_resolver.h" |
| #include "net/http/http_auth_handler_factory.h" |
| @@ -263,7 +265,7 @@ void CronetEnvironment::Start() { |
| } |
| CronetEnvironment::~CronetEnvironment() { |
| -// net::HTTPProtocolHandlerDelegate::SetInstance(nullptr); |
| + // net::HTTPProtocolHandlerDelegate::SetInstance(nullptr); |
|
kapishnikov
2016/11/18 20:58:03
Why do we need it here?
mef
2016/11/18 22:29:36
git cl format is different for .mm and .cc.
|
| } |
| void CronetEnvironment::InitializeOnNetworkThread() { |
| @@ -343,8 +345,8 @@ void CronetEnvironment::InitializeOnNetworkThread() { |
| params.enable_quic = quic_enabled(); |
| for (const auto& quic_hint : quic_hints_) { |
| - net::AlternativeService alternative_service(net::AlternateProtocol::QUIC, |
| - "", quic_hint.port()); |
| + net::AlternativeService alternative_service(net::kProtoQUIC, "", |
|
kapishnikov
2016/11/18 20:58:03
Why are we changing net::AlternateProtocol::QUIC t
mef
2016/11/18 22:29:36
Synced to head.
|
| + quic_hint.port()); |
| url::SchemeHostPort quic_hint_server("https", quic_hint.host(), |
| quic_hint.port()); |
| main_context_->http_server_properties()->SetAlternativeService( |
| @@ -370,6 +372,10 @@ void CronetEnvironment::InitializeOnNetworkThread() { |
| new net::HttpCache(http_network_session, std::move(main_backend), |
| true /* set_up_quic_server_info */); |
| main_context_->set_http_transaction_factory(main_cache); |
| + // Cookies |
| + cookie_store_ = net::CookieStoreIOS::CreateCookieStore( |
| + [NSHTTPCookieStorage sharedHTTPCookieStorage]); |
| + main_context_->set_cookie_store(cookie_store_.get()); |
| net::URLRequestJobFactoryImpl* job_factory = |
| new net::URLRequestJobFactoryImpl; |