Chromium Code Reviews| Index: Source/WebCore/loader/DocumentThreadableLoader.cpp |
| diff --git a/Source/WebCore/loader/DocumentThreadableLoader.cpp b/Source/WebCore/loader/DocumentThreadableLoader.cpp |
| index 9b5f00fb8ae56a85b012c85de7fc2211e2d423ac..df15d7a9aeeef1186be0ce7ccd061c345ae13d98 100644 |
| --- a/Source/WebCore/loader/DocumentThreadableLoader.cpp |
| +++ b/Source/WebCore/loader/DocumentThreadableLoader.cpp |
| @@ -50,9 +50,7 @@ |
| #include <wtf/Assertions.h> |
| #include <wtf/UnusedParam.h> |
| -#if ENABLE(INSPECTOR) |
| #include "ProgressTracker.h" |
|
yurys
2013/04/05 12:11:20
Please move it above to keep alphabetical order.
|
| -#endif |
| namespace WebCore { |
| @@ -247,11 +245,9 @@ void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, cons |
| String accessControlErrorDescription; |
| if (m_actualRequest) { |
| -#if ENABLE(INSPECTOR) |
| DocumentLoader* loader = m_document->frame()->loader()->documentLoader(); |
| InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_document->frame(), identifier, response); |
| InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, response, 0); |
| -#endif |
| if (!passesAccessControlCheck(response, m_options.allowCredentials, securityOrigin(), accessControlErrorDescription)) { |
| preflightFailure(identifier, response.url(), accessControlErrorDescription); |
| @@ -291,9 +287,7 @@ void DocumentThreadableLoader::didReceiveData(unsigned long identifier, const ch |
| // Preflight data should be invisible to clients. |
| if (m_actualRequest) { |
| -#if ENABLE(INSPECTOR) |
| InspectorInstrumentation::didReceiveData(m_document->frame(), identifier, 0, 0, dataLength); |
| -#endif |
| return; |
| } |
| @@ -314,9 +308,7 @@ void DocumentThreadableLoader::notifyFinished(CachedResource* resource) |
| void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double finishTime) |
| { |
| if (m_actualRequest) { |
| -#if ENABLE(INSPECTOR) |
| InspectorInstrumentation::didFinishLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, finishTime); |
| -#endif |
| ASSERT(!m_sameOriginRequest); |
| ASSERT(m_options.crossOriginRequestPolicy == UseAccessControl); |
| preflightSuccess(); |
| @@ -326,10 +318,8 @@ void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double |
| void DocumentThreadableLoader::didFail(unsigned long identifier, const ResourceError& error) |
| { |
| -#if ENABLE(INSPECTOR) |
| if (m_actualRequest) |
| InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error); |
| -#endif |
| m_client->didFail(error); |
| } |
| @@ -350,10 +340,8 @@ void DocumentThreadableLoader::preflightSuccess() |
| void DocumentThreadableLoader::preflightFailure(unsigned long identifier, const String& url, const String& errorDescription) |
| { |
| ResourceError error(errorDomainWebKitInternal, 0, url, errorDescription); |
| -#if ENABLE(INSPECTOR) |
| if (m_actualRequest) |
| InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error); |
| -#endif |
| m_actualRequest = nullptr; // Prevent didFinishLoading() from bypassing access check. |
| m_client->didFailAccessControlCheck(error); |
| } |
| @@ -384,12 +372,10 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur |
| ASSERT(!m_resource); |
| m_resource = m_document->cachedResourceLoader()->requestRawResource(newRequest); |
| if (m_resource) { |
| -#if ENABLE(INSPECTOR) |
| if (m_resource->loader()) { |
| unsigned long identifier = m_resource->loader()->identifier(); |
| InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_document, identifier, m_client); |
| } |
| -#endif |
| m_resource->addClient(this); |
| } |
| return; |