Пример #1
0
// This is a special URL for Android. Query the Java InputStream
// for data and send to WebCore
WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& webResourceRequest, UrlInterceptResponse* intercept)
    : m_urlLoader(loader)
    , m_interceptResponse(intercept)
    , m_url(webResourceRequest.url())
    , m_userAgent(webResourceRequest.userAgent())
    , m_loadState(Created)
    , m_authRequestCount(0)
    , m_cacheMode(0)
    , m_runnableFactory(this)
    , m_wantToPause(false)
    , m_isPaused(false)
    //SAMSUNG_CHANGES >>
    , m_ShouldSniffFeed(false)
    , m_isMainResource(false)
    , m_isMainFrame(false)
    //SAMSUNG_CHANGES <<
    , m_isSync(false)
{
    //SAMSUNG_CHANGES >>
    WebCore::Settings* settings = m_urlLoader->frame()->page()?m_urlLoader->frame()->page()->settings():NULL;
    if(settings){
    	m_rssSniffingEnabled = settings->rssSniffingEnabled();
    } else {
        m_rssSniffingEnabled = false;
    }
    //SAMSUNG_CHANGES <<
}
Пример #2
0
WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& webResourceRequest)
    : m_urlLoader(loader)
    , m_url(webResourceRequest.url())
    , m_userAgent(webResourceRequest.userAgent())
    , m_loadState(Created)
    , m_authRequestCount(0)
    , m_cacheMode(0)
    , m_runnableFactory(this)
    , m_wantToPause(false)
    , m_isPaused(false)
    //SAMSUNG_CHANGES >>
    , m_ShouldSniffFeed(false)
    , m_isMainResource(false)
    , m_isMainFrame(false)
    //SAMSUNG_CHANGES <<
    , m_isSync(false)
{
    GURL gurl(m_url);

    m_request = new net::URLRequest(gurl, this);

    m_request->SetExtraRequestHeaders(webResourceRequest.requestHeaders());
    m_request->SetExtraRequestHeaderByName(kXRequestedWithHeader, s_packageName.Get().value, false);
    m_request->set_referrer(webResourceRequest.referrer());
    m_request->set_method(webResourceRequest.method());
    m_request->set_load_flags(webResourceRequest.loadFlags());
    //SAMSUNG_CHANGES >>
    WebCore::Settings* settings = m_urlLoader->frame()->page()?m_urlLoader->frame()->page()->settings():NULL;
    if(settings){
    	m_rssSniffingEnabled = settings->rssSniffingEnabled();
    } else {
        m_rssSniffingEnabled = false;
    }
    //SAMSUNG_CHANGES <<
}