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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp

Issue 1985033003: [DevTools] Use registerWeakMembers in NetworkResourcesData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, removed more code Created 4 years, 7 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/core/inspector/InspectorInstrumentation.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
index 313209ecf5ac7d20b8384d5f7d096d988dd75c40..e87658c2a722205a5d14beb24e0f06a19a6ca805 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
@@ -51,16 +51,6 @@
namespace blink {
-namespace {
-
-PersistentHeapHashSet<WeakMember<InstrumentingAgents>>& instrumentingAgentsSet()
-{
- DEFINE_STATIC_LOCAL(PersistentHeapHashSet<WeakMember<InstrumentingAgents>>, instrumentingAgentsSet, ());
- return instrumentingAgentsSet;
-}
-
-}
-
namespace InspectorInstrumentation {
AsyncTask::AsyncTask(ExecutionContext* context, void* task) : AsyncTask(context, task, true)
@@ -183,17 +173,6 @@ void continueWithPolicyIgnore(LocalFrame* frame, DocumentLoader* loader, unsigne
didReceiveResourceResponseButCanceled(frame, loader, identifier, r, resource);
}
-void willDestroyResource(Resource* cachedResource)
-{
- ASSERT(isMainThread());
- for (InstrumentingAgents* instrumentingAgents: instrumentingAgentsSet()) {
- if (!instrumentingAgents->hasInspectorResourceAgents())
- continue;
- for (InspectorResourceAgent* resourceAgent : instrumentingAgents->inspectorResourceAgents())
- resourceAgent->willDestroyResource(cachedResource);
- }
-}
-
bool consoleAgentEnabled(ExecutionContext* executionContext)
{
InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionContext);
@@ -206,19 +185,6 @@ bool consoleAgentEnabled(ExecutionContext* executionContext)
return false;
}
-void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
-{
- ASSERT(isMainThread());
- instrumentingAgentsSet().add(instrumentingAgents);
-}
-
-void unregisterInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
-{
- ASSERT(isMainThread());
- ASSERT(instrumentingAgentsSet().contains(instrumentingAgents));
- instrumentingAgentsSet().remove(instrumentingAgents);
-}
-
InstrumentingAgents* instrumentingAgentsFor(WorkerGlobalScope* workerGlobalScope)
{
if (!workerGlobalScope)

Powered by Google App Engine
This is Rietveld 408576698