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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp

Issue 2760363002: [instrumentation] Generalize instrumentation to be used beyond the core layer (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/platform/loader/fetch/FetchContext.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp
index 00b0a35a54711fa117d8636445f00d4ab1e17bd1..26cbe117e58ef2f95ad981fa80378720dc6eb1b4 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.cpp
@@ -30,6 +30,8 @@
#include "platform/loader/fetch/FetchContext.h"
+#include "platform/PlatformInstrumentationAgents.h"
+#include "platform/instrumentation/PlatformTraceEventsAgent.h"
#include "public/platform/WebCachePolicy.h"
namespace blink {
@@ -39,6 +41,16 @@ FetchContext& FetchContext::nullInstance() {
return instance;
}
+FetchContext::FetchContext()
+ : m_instrumentingAgents(new PlatformInstrumentationAgents) {
+ m_instrumentingAgents->addPlatformTraceEventsAgent(
+ new PlatformTraceEventsAgent);
+}
+
+DEFINE_TRACE(FetchContext) {
+ visitor->trace(m_instrumentingAgents);
+}
+
void FetchContext::dispatchDidChangeResourcePriority(unsigned long,
ResourceLoadPriority,
int) {}

Powered by Google App Engine
This is Rietveld 408576698