Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2737623006: Revert of [instrumentation] Introduce InspectorTraceEvents agent (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 58b093eb3187a3a77a81008a857d30ae8ee0fd63..f05b6b4cd689537d5f19ed947e748b848c2c955d 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -430,6 +430,8 @@
ResourceRequest& request,
const ResourceResponse& redirectResponse,
const FetchInitiatorInfo& initiatorInfo) {
+ TRACE_EVENT1("devtools.timeline", "ResourceSendRequest", "data",
+ InspectorSendRequestEvent::data(identifier, frame(), request));
// For initial requests, prepareRequest() is called in
// willStartLoadingResource(), before revalidation policy is determined. That
// call doesn't exist for redirects, so call preareRequest() here.
@@ -465,12 +467,18 @@
void FrameFetchContext::dispatchDidReceiveEncodedData(unsigned long identifier,
int encodedDataLength) {
+ TRACE_EVENT1(
+ "devtools.timeline", "ResourceReceivedData", "data",
+ InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength));
probe::didReceiveEncodedDataLength(frame(), identifier, encodedDataLength);
}
void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier,
int dataLength,
int encodedDataLength) {
+ TRACE_EVENT1(
+ "devtools.timeline", "ResourceReceivedData", "data",
+ InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength));
frame()->loader().progress().incrementProgress(identifier, dataLength);
probe::didReceiveData(frame(), identifier, 0, dataLength);
probe::didReceiveEncodedDataLength(frame(), identifier, encodedDataLength);
@@ -480,9 +488,12 @@
double finishTime,
int64_t encodedDataLength,
int64_t decodedBodyLength) {
+ TRACE_EVENT1(
+ "devtools.timeline", "ResourceFinish", "data",
+ InspectorResourceFinishEvent::data(identifier, finishTime, false,
+ encodedDataLength, decodedBodyLength));
frame()->loader().progress().completeProgress(identifier);
- probe::didFinishLoading(frame(), identifier, finishTime, encodedDataLength,
- decodedBodyLength);
+ probe::didFinishLoading(frame(), identifier, finishTime, encodedDataLength);
if (frame()->frameScheduler())
frame()->frameScheduler()->didStopLoading(identifier);
}
@@ -491,6 +502,9 @@
const ResourceError& error,
int64_t encodedDataLength,
bool isInternalRequest) {
+ TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
+ InspectorResourceFinishEvent::data(identifier, 0, true,
+ encodedDataLength, 0));
frame()->loader().progress().completeProgress(identifier);
probe::didFailLoading(frame(), identifier, error);
// Notification to FrameConsole should come AFTER InspectorInstrumentation
@@ -1032,6 +1046,9 @@
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 &&

Powered by Google App Engine
This is Rietveld 408576698