Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
index 607cefdf4231681b31a6de9f5e17c63050659f82..290af5a21a8e9e652f2ae8c9b985ce17a5a1ba41 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
@@ -30,6 +30,8 @@ |
#include "core/loader/FrameFetchContext.h" |
+#include <algorithm> |
+#include <memory> |
caseq
2017/02/21 22:53:30
add blank line
alph
2017/02/22 00:31:32
Done.
|
#include "bindings/core/v8/ScriptController.h" |
#include "bindings/core/v8/V8DOMActivityLogger.h" |
#include "core/dom/Document.h" |
@@ -64,6 +66,7 @@ |
#include "core/timing/DOMWindowPerformance.h" |
#include "core/timing/Performance.h" |
#include "platform/WebFrameScheduler.h" |
+#include "platform/instrumentation/inspector/PlatformInspectorTraceEvents.h" |
#include "platform/instrumentation/tracing/TracedValue.h" |
#include "platform/loader/fetch/ClientHintsPreferences.h" |
#include "platform/loader/fetch/FetchInitiatorTypeNames.h" |
@@ -81,8 +84,6 @@ |
#include "public/platform/WebInsecureRequestPolicy.h" |
#include "public/platform/WebViewScheduler.h" |
#include "wtf/Vector.h" |
-#include <algorithm> |
-#include <memory> |
namespace blink { |
@@ -470,9 +471,8 @@ void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, |
void FrameFetchContext::dispatchDidReceiveEncodedData(unsigned long identifier, |
int encodedDataLength) { |
- TRACE_EVENT1( |
- "devtools.timeline", "ResourceReceivedData", "data", |
- InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength)); |
+ TRACE_EVENT1("devtools.timeline", "ResourceReceivedData", "data", |
+ InspectorReceiveDataEvent::data(identifier, encodedDataLength)); |
InspectorInstrumentation::didReceiveEncodedDataLength(frame(), identifier, |
encodedDataLength); |
} |
@@ -480,9 +480,8 @@ void FrameFetchContext::dispatchDidReceiveEncodedData(unsigned long identifier, |
void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier, |
int dataLength, |
int encodedDataLength) { |
- TRACE_EVENT1( |
- "devtools.timeline", "ResourceReceivedData", "data", |
- InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength)); |
+ TRACE_EVENT1("devtools.timeline", "ResourceReceivedData", "data", |
+ InspectorReceiveDataEvent::data(identifier, encodedDataLength)); |
frame()->loader().progress().incrementProgress(identifier, dataLength); |
InspectorInstrumentation::didReceiveData(frame(), identifier, 0, dataLength); |
InspectorInstrumentation::didReceiveEncodedDataLength(frame(), identifier, |
@@ -492,9 +491,6 @@ void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier, |
void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier, |
double finishTime, |
int64_t encodedDataLength) { |
- TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", |
- InspectorResourceFinishEvent::data(identifier, finishTime, false, |
- encodedDataLength)); |
frame()->loader().progress().completeProgress(identifier); |
InspectorInstrumentation::didFinishLoading(frame(), identifier, finishTime, |
encodedDataLength); |
@@ -506,9 +502,6 @@ void FrameFetchContext::dispatchDidFail(unsigned long identifier, |
const ResourceError& error, |
int64_t encodedDataLength, |
bool isInternalRequest) { |
- TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", |
- InspectorResourceFinishEvent::data(identifier, 0, true, |
- encodedDataLength)); |
frame()->loader().progress().completeProgress(identifier); |
InspectorInstrumentation::didFailLoading(frame(), identifier, error); |
// Notification to FrameConsole should come AFTER InspectorInstrumentation |
@@ -534,6 +527,9 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache( |
InspectorInstrumentation::markResourceAsCached(frame(), identifier); |
if (!resource->response().isNull()) { |
+ TRACE_EVENT1( |
+ "devtools.timeline", "ResourceReceiveResponse", "data", |
+ InspectorReceiveResponseEvent::data(identifier, resource->response())); |
dispatchDidReceiveResponseInternal(identifier, resource->response(), |
frameType, requestContext, resource, |
LinkLoader::DoNotLoadResources); |
@@ -542,6 +538,8 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache( |
if (resource->encodedSize() > 0) |
dispatchDidReceiveData(identifier, 0, resource->encodedSize()); |
+ TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", |
+ InspectorResourceFinishEvent::data(identifier, 0, false, 0)); |
dispatchDidFinishLoading(identifier, 0, 0); |
} |
@@ -1069,9 +1067,6 @@ void FrameFetchContext::dispatchDidReceiveResponseInternal( |
WebURLRequest::RequestContext requestContext, |
Resource* resource, |
LinkLoader::CanLoadResources resourceLoadingPolicy) { |
- TRACE_EVENT1( |
- "devtools.timeline", "ResourceReceiveResponse", "data", |
- InspectorReceiveResponseEvent::data(identifier, frame(), response)); |
MixedContentChecker::checkMixedPrivatePublic(frame(), |
response.remoteIPAddress()); |
if (m_documentLoader && |