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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 1410153009: DevTools: Make network events continuous on Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify the patch Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/fetch/DEPS ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 9066f8141d813477d92c978ba9e0f0449964fa98..62cb6fc258d8e9bfde182ba16c87fbf901534f43 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -35,6 +35,7 @@
#include "core/fetch/ResourceLoader.h"
#include "core/fetch/ResourceLoaderSet.h"
#include "core/fetch/UniqueIdentifier.h"
+#include "core/inspector/InspectorTraceEvents.h"
pfeldman 2015/11/11 04:52:10 I assume you don't want this dependency here as pe
#include "platform/Logging.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
@@ -338,6 +339,9 @@ void ResourceFetcher::moveCachedNonBlockingResourceToBlocking(Resource* resource
ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, const ResourceFactory& factory, const SubstituteData& substituteData)
{
ASSERT(request.options().synchronousPolicy == RequestAsynchronously || factory.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet);
+ unsigned long identifier = createUniqueIdentifier();
+ TRACE_EVENT1("devtools.timeline", "ResourceSendRequest",
+ "data", InspectorSendRequestEvent::data(identifier, request.resourceRequest()));
context().upgradeInsecureRequest(request);
context().addClientHintsIfNecessary(request);
@@ -407,7 +411,7 @@ ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co
m_deadStatsRecorder.update(policy);
if (policy != Use)
- resource->setIdentifier(createUniqueIdentifier());
+ resource->setIdentifier(identifier);
if (!request.forPreload() || policy != Use) {
ResourceLoadPriority priority = loadPriority(factory.type(), request, ResourcePriority::NotVisible);
« no previous file with comments | « third_party/WebKit/Source/core/fetch/DEPS ('k') | third_party/WebKit/Source/core/fetch/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698