Index: Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp |
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp |
index 10c288ff0593d520c8fd339375b8a196d4cae1fd..4a503e2784b4a3bf680e252c531c5045f1949fdd 100644 |
--- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp |
+++ b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp |
@@ -42,6 +42,7 @@ |
#include "InspectorInstrumentation.h" |
#include "ManifestParser.h" |
#include "Page.h" |
+#include "ProgressTracker.h" |
#include "ResourceBuffer.h" |
#include "ResourceHandle.h" |
#include "ScriptProfile.h" |
@@ -51,10 +52,6 @@ |
#include <wtf/MainThread.h> |
#include <wtf/UnusedParam.h> |
-#if ENABLE(INSPECTOR) |
-#include "ProgressTracker.h" |
-#endif |
- |
namespace WebCore { |
ApplicationCacheGroup::ApplicationCacheGroup(const KURL& manifestURL, bool isCopy) |
@@ -520,23 +517,19 @@ PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KUR |
#endif |
RefPtr<ResourceHandle> handle = ResourceHandle::create(m_frame->loader()->networkingContext(), request, this, false, true); |
-#if ENABLE(INSPECTOR) |
// Because willSendRequest only gets called during redirects, we initialize |
// the identifier and the first willSendRequest here. |
m_currentResourceIdentifier = m_frame->page()->progress()->createUniqueIdentifier(); |
ResourceResponse redirectResponse = ResourceResponse(); |
InspectorInstrumentation::willSendRequest(m_frame, m_currentResourceIdentifier, m_frame->loader()->documentLoader(), request, redirectResponse); |
-#endif |
return handle; |
} |
void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const ResourceResponse& response) |
{ |
-#if ENABLE(INSPECTOR) |
DocumentLoader* loader = (handle == m_manifestHandle) ? 0 : m_frame->loader()->documentLoader(); |
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame, m_currentResourceIdentifier, response); |
InspectorInstrumentation::didReceiveResourceResponse(cookie, m_currentResourceIdentifier, loader, response, 0); |
-#endif |
if (handle == m_manifestHandle) { |
didReceiveManifestResponse(response); |
@@ -608,9 +601,7 @@ void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* d |
{ |
UNUSED_PARAM(encodedDataLength); |
-#if ENABLE(INSPECTOR) |
InspectorInstrumentation::didReceiveData(m_frame, m_currentResourceIdentifier, 0, length, 0); |
-#endif |
if (handle == m_manifestHandle) { |
didReceiveManifestData(data, length); |
@@ -625,11 +616,7 @@ void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* d |
void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double finishTime) |
{ |
-#if ENABLE(INSPECTOR) |
InspectorInstrumentation::didFinishLoading(m_frame, m_frame->loader()->documentLoader(), m_currentResourceIdentifier, finishTime); |
-#else |
- UNUSED_PARAM(finishTime); |
-#endif |
if (handle == m_manifestHandle) { |
didFinishLoadingManifest(); |
@@ -664,11 +651,7 @@ void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double fini |
void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& error) |
{ |
-#if ENABLE(INSPECTOR) |
InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader()->documentLoader(), m_currentResourceIdentifier, error); |
-#else |
- UNUSED_PARAM(error); |
-#endif |
if (handle == m_manifestHandle) { |
// A network error is logged elsewhere, no need to log again. Also, it's normal for manifest fetching to fail when working offline. |