Reviewers: haraken
CL:
https://codereview.chromium.org/2648083002/Message:
@haraken
PTAL, Thank you
Description:
Migrate Timer to TaskRunnerTimer in InspectorNetworkAgent
Migrate Timer to TaskRunnerTimer in InspectorNetworkAgent
InspectorNetworkAgent is associated with networking task source.
BUG=624694
Affected files (+3, -2 lines):
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 93b7ec551e89ce49b84a26259511b15afd699f00..a34eb693facc0a69bfb062315fddad5d96794b65 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -34,6 +34,7 @@
#include "bindings/core/v8/SourceLocation.h"
#include "core/dom/Document.h"
#include "core/dom/ScriptableDocumentParser.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/fetch/FetchInitiatorInfo.h"
#include "core/fetch/FetchInitiatorTypeNames.h"
#include "core/fetch/MemoryCache.h"
@@ -1531,6 +1532,7 @@ InspectorNetworkAgent::InspectorNetworkAgent(InspectedFrames* inspectedFrames)
m_pendingRequest(nullptr),
m_isRecalculatingStyle(false),
m_removeFinishedReplayXHRTimer(
+ TaskRunnerHelper::get(TaskType::Networking, inspectedFrames->root()),
this,
&InspectorNetworkAgent::removeFinishedReplayXHRFired) {}
Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
index c55719d8fb54020d24ba80bc7118ff80f02b04e2..c38e1928723bee37cec71e158137343247549afa 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
@@ -36,7 +36,6 @@
#include "core/inspector/InspectorBaseAgent.h"
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/protocol/Network.h"
-#include "platform/Timer.h"
#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
@@ -280,7 +279,7 @@ class CORE_EXPORT InspectorNetworkAgent final
HeapHashSet<Member<XMLHttpRequest>> m_replayXHRs;
HeapHashSet<Member<XMLHttpRequest>> m_replayXHRsToBeDeleted;
- Timer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer;
+ TaskRunnerTimer<InspectorNetworkAgent> m_removeFinishedReplayXHRTimer;
};
} // namespace blink