SfRequestContext::SfRequestContext() { mUserAgent = MakeUserAgent().c_str(); set_net_log(new SfNetLog()); set_host_resolver( net::CreateSystemHostResolver( net::HostResolver::kDefaultParallelism, NULL /* resolver_proc */, net_log())); set_ssl_config_service( net::SSLConfigService::CreateSystemSSLConfigService()); mProxyConfigService = new net::ProxyConfigServiceAndroid; set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( mProxyConfigService, net_log())); set_http_transaction_factory(new net::HttpCache( host_resolver(), new net::CertVerifier(), dnsrr_resolver(), dns_cert_checker(), proxy_service(), ssl_config_service(), net::HttpAuthHandlerFactory::CreateDefault(host_resolver()), network_delegate(), net_log(), NULL)); // backend_factory set_cookie_store(new net::CookieMonster(NULL, NULL)); }
SfRequestContext::SfRequestContext() { #ifndef ANDROID_DEFAULT_CODE mWapProfile = ""; mUserAgent = ""; initStreamingInfo(); #else mUserAgent = MakeUserAgent().c_str(); #endif set_net_log(new SfNetLog()); set_host_resolver( net::CreateSystemHostResolver( net::HostResolver::kDefaultParallelism, NULL /* resolver_proc */, net_log())); set_ssl_config_service( net::SSLConfigService::CreateSystemSSLConfigService()); #ifdef HTTP_STREAM_SUPPORT_PROXY gProxyConfigService.reset( new (net::ProxyConfigServiceAndroid)); set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( gProxyConfigService.get(), net_log())); #else mProxyConfigService = new net::ProxyConfigServiceAndroid; set_proxy_service(net::ProxyService::CreateWithoutProxyResolver( mProxyConfigService, net_log())); #endif set_http_transaction_factory(new net::HttpCache( host_resolver(), new net::CertVerifier(), dnsrr_resolver(), dns_cert_checker(), proxy_service(), ssl_config_service(), net::HttpAuthHandlerFactory::CreateDefault(host_resolver()), network_delegate(), net_log(), NULL)); // backend_factory set_cookie_store(new net::CookieMonster(NULL, NULL)); }