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)); }
WebRequestContext::WebRequestContext(bool isPrivateBrowsing) : m_isPrivateBrowsing(isPrivateBrowsing) { // Initialize chromium logging, needs to be done before any chromium code is called. initChromium(); if (m_isPrivateBrowsing) { // Delete the old files if this is the first private browsing instance // They are probably leftovers from a power cycle // We do not need to clear the cache as it is in memory only for private browsing if (!numPrivateBrowsingInstances) WebCookieJar::cleanup(true); numPrivateBrowsingInstances++; } WebCache* cache = WebCache::get(m_isPrivateBrowsing); set_host_resolver(cache->hostResolver()); set_http_transaction_factory(cache->cache()); WebCookieJar* cookieJar = WebCookieJar::get(m_isPrivateBrowsing); set_cookie_store(cookieJar->cookieStore()); set_cookie_policy(cookieJar); // Also hardcoded in FrameLoader.java set_accept_charset("utf-8, iso-8859-1, utf-16, *;q=0.7"); }
WebRequestContext::WebRequestContext(bool isPrivateBrowsing) : m_isPrivateBrowsing(isPrivateBrowsing) { // Initialize chromium logging, needs to be done before any chromium code is called. initChromium(); if (m_isPrivateBrowsing) { // Delete the old files if this is the first private browsing instance // They are probably leftovers from a power cycle // We do not need to clear the cache as it is in memory only for private browsing if (!numPrivateBrowsingInstances) WebCookieJar::cleanup(true); numPrivateBrowsingInstances++; } WebCache* cache = WebCache::get(m_isPrivateBrowsing); set_host_resolver(cache->hostResolver()); set_http_transaction_factory(cache->cache()); WebCookieJar* cookieJar = WebCookieJar::get(m_isPrivateBrowsing); set_cookie_store(cookieJar->cookieStore()); set_cookie_policy(cookieJar); // Also hardcoded in FrameLoader.java // SAMSUNG CHANGE >> set_accept_charset("utf-8, iso-8859-1, utf-16, *;q=0.7"); // Add additional accept charset to Accept Header (CTC Requirement) if(strcmp(SecNativeFeature::getInstance()->getString(CscFeature_Web_AddCharSetToHttpHeader), "") != 0){ const char *sCscValue = SecNativeFeature::getInstance()->getString(CscFeature_Web_AddCharSetToHttpHeader); set_accept_charset(sCscValue); } // SAMSUNG CHANGE << }
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)); }