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

Unified Diff: third_party/WebKit/Source/platform/network/NetworkInstrumentation.h

Issue 2444783002: Add trace event for complete network request (Closed)
Patch Set: Nuke old tracepoints. Add priority instant events. Add TracedValue. Created 4 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
Index: third_party/WebKit/Source/platform/network/NetworkInstrumentation.h
diff --git a/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h
new file mode 100644
index 0000000000000000000000000000000000000000..50a70bbf5b460ba1eabacd8d49b19190eb958770
--- /dev/null
+++ b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NetworkInstrumentation_h
+#define NetworkInstrumentation_h
+
+#include "platform/PlatformExport.h"
+#include "platform/network/ResourceLoadPriority.h"
+#include "platform/network/ResourceRequest.h"
caseq 2016/11/08 18:24:32 please forward declare here instead.
dproy 2016/11/09 20:44:00 Done.
+
+namespace network_instrumentation {
+
+enum RequestOutcome { Success, Fail };
+
+class PLATFORM_EXPORT ScopedResourceLoadTracker {
+ public:
+ ScopedResourceLoadTracker(unsigned long resourceID,
+ const blink::ResourceRequest&);
+ ~ScopedResourceLoadTracker();
+ void doNotCloseSliceAtEndOfScope();
+
+ private:
+ bool closeSliceAtEndOfScope;
caseq 2016/11/08 18:24:32 use m_ prefix. Also, how about a more specific nam
dproy 2016/11/09 20:44:00 Done. I changed it to m_resourceLoadContinuesBeyon
+ const unsigned long resourceID;
caseq 2016/11/08 18:24:32 m_resourceId
dproy 2016/11/09 20:44:00 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedResourceLoadTracker);
+};
+
+void PLATFORM_EXPORT initialResourcePrioritySet(unsigned long resourceID,
+ blink::ResourceLoadPriority);
+
+void PLATFORM_EXPORT resourcePriorityChanged(unsigned long resourceID,
+ blink::ResourceLoadPriority);
+
+void PLATFORM_EXPORT endResourceLoad(unsigned long resourceID, RequestOutcome);
+
+const char* RequestOutcomeToString(RequestOutcome);
caseq 2016/11/08 18:24:32 do we need to expose this one?
dproy 2016/11/09 20:44:00 Nope - thanks for pointing this out.
+
+} // namespace network_instrumentation
+
+#endif // NetworkInstrumentation_h

Powered by Google App Engine
This is Rietveld 408576698