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

Unified Diff: third_party/WebKit/Source/core/fetch/RawResourceTest.cpp

Issue 1413233005: tracing: Report ResourceClients and the reason for not deletable for web-caches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reflected haraken's comments. Created 5 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/core/fetch/RawResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/RawResourceTest.cpp b/third_party/WebKit/Source/core/fetch/RawResourceTest.cpp
index 617b1161992c48ae8480aaaba177a1744efaa954..7ba043a8c3740663695c76db8e3158264cff67c8 100644
--- a/third_party/WebKit/Source/core/fetch/RawResourceTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/RawResourceTest.cpp
@@ -89,10 +89,11 @@ public:
~DummyClient() override {}
// ResourceClient implementation.
- virtual void notifyFinished(Resource* resource)
+ void notifyFinished(Resource* resource) override
{
m_called = true;
}
+ String debugName() const override { return "DummyClient"; }
bool called() { return m_called; }
private:
@@ -110,13 +111,15 @@ public:
~AddingClient() override {}
// ResourceClient implementation.
- virtual void notifyFinished(Resource* resource)
+ void notifyFinished(Resource* resource) override
{
// First schedule an asynchronous task to remove the client.
// We do not expect the client to be called.
m_removeClientTimer.startOneShot(0, BLINK_FROM_HERE);
resource->addClient(m_dummyClient);
}
+ String debugName() const override { return "AddingClient"; }
+
void removeClient(Timer<AddingClient>* timer)
{
m_resource->removeClient(m_dummyClient);
@@ -156,11 +159,12 @@ public:
~RemovingClient() override {}
// ResourceClient implementation.
- virtual void notifyFinished(Resource* resource)
+ void notifyFinished(Resource* resource) override
{
resource->removeClient(m_dummyClient);
resource->removeClient(this);
}
+ String debugName() const override { return "RemovingClient"; }
private:
DummyClient* m_dummyClient;
};
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MockImageResourceClient.h ('k') | third_party/WebKit/Source/core/fetch/Resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698