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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h

Issue 2218943002: Introduce ServiceWorker.EventDispatchingDelay UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated mpearson@'s comment Created 4 years, 4 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/modules/serviceworkers/RespondWithObserver.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
index 3f9cd401865dd7e70138514f6a989db5a3acae21..8e5029ac777502593bc20ae61976db7c918e4d99 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
@@ -32,6 +32,7 @@ public:
void contextDestroyed() override;
+ void willDispatchEvent();
void didDispatchEvent(DispatchEventResult dispatchResult);
// Observes the promise and delays calling didHandleFetchEvent() until the
@@ -55,6 +56,8 @@ private:
WebURLRequest::FrameType m_frameType;
WebURLRequest::RequestContext m_requestContext;
+ double m_eventDispatchTime = 0;
+
enum State { Initial, Pending, Done };
State m_state;

Powered by Google App Engine
This is Rietveld 408576698