void WebRequest::start() { ASSERT(m_loadState == Created, "Start called on a WebRequest not in CREATED state: (%s)", m_url.c_str()); #ifdef LOG_REQUESTS android_printLog(ANDROID_LOG_DEBUG, "KM", "(%p) start (%d) (%s)", this, ++remaining, m_url.c_str()); time(&m_startTime); #endif m_loadState = Started; if (m_interceptResponse != NULL) return handleInterceptedURL(); // Handle data urls before we send it off to the http stack if (m_request->url().SchemeIs("data")) return handleDataURL(m_request->url()); if (m_request->url().SchemeIs("browser")) return handleBrowserURL(m_request->url()); // Update load flags with settings from WebSettings int loadFlags = m_request->load_flags(); updateLoadFlags(loadFlags); m_request->set_load_flags(loadFlags); m_request->Start(); }
void WebRequest::start(bool isMainResource, bool isMainFrame) //SAMSUNG_CHANGES { ASSERT(m_loadState == Created, "Start called on a WebRequest not in CREATED state: (%s)", m_url.c_str()); #ifdef LOG_REQUESTS android_printLog(ANDROID_LOG_DEBUG, "KM", "(%p) start (%d) (%s)", this, ++remaining, m_url.c_str()); time(&m_startTime); #endif // SAMSUNG CHANGES : add_network_log LOGIFDEBUG("start() url(%s) isMainFrame(%d) isMainResource(%d)", m_url.c_str(), isMainResource, isMainFrame); //SAMSUNG_CHANGES >> m_isMainResource = isMainResource; m_isMainFrame = isMainFrame; //SAMSUNG_CHANGES << m_loadState = Started; if (m_interceptResponse != NULL) return handleInterceptedURL(); // Handle data urls before we send it off to the http stack if (m_request->url().SchemeIs("data")) return handleDataURL(m_request->url()); if (m_request->url().SchemeIs("browser")) return handleBrowserURL(m_request->url()); // Update load flags with settings from WebSettings int loadFlags = m_request->load_flags(); updateLoadFlags(loadFlags); m_request->set_load_flags(loadFlags); m_request->Start(); // SAMSUNG CHANGE: read timer start timer_.Start(base::TimeDelta::FromSeconds(kWebRequestReadTimeoutInSeconds), this, &WebRequest::OnReadTimeout); // SAMSUNG CHANGE }