예제 #1
0
void AddCookie(const char8_t* pHeaderValue, const char8_t* pURI)
{
	if(!pHeaderValue || !pURI)
		return;

	WebCore::ResourceHandleManager* pRHM = WebCore::ResourceHandleManager::sharedInstance();
	EA::WebKit::CookieManager* pCM = pRHM->GetCookieManager();   
	pCM->ProcessCookieHeader(pHeaderValue, pURI);
}
예제 #2
0
// This function is called by the Document or JSDocument when the page itself specifies
// a cookie. We want to relay this to our central cookie manager.
void setCookies(Document* /*document*/, const KURL& url, const KURL& /*policyURL*/, const String& value)
{
    EA::WebKit::CookieManager* cookieManager = WKAL::ResourceHandleManager::sharedInstance()->GetCookieManager();
    
    if(cookieManager)
    {
        EA::WebKit::FixedString16_256 urlStr16;
        urlStr16.assign(url.string().characters(),url.string().length());
        EA::WebKit::FixedString8_256 url8; 
        EA::WebKit::ConvertToString8(urlStr16,url8);

        EA::WebKit::FixedString16_256 valueStr16;
        valueStr16.assign(value.characters(),value.length());
        EA::WebKit::FixedString8_256 valueStr8; 
        EA::WebKit::ConvertToString8(valueStr16, valueStr8);
        cookieManager->ProcessCookieHeader(valueStr8.c_str(),url8.c_str());
    }
}