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

Unified Diff: third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h

Issue 2098433002: Remove ExecutionContextTask::taskNameForInstrumentation() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/filesystem/DOMFileSystem.h
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
index a980c1bccc76c28d8ad207ed821cf164578c2ac5..0d884f2268beb17a6a82e0d51191a62db02db074 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
@@ -106,16 +106,13 @@ public:
private:
DOMFileSystem(ExecutionContext*, const String& name, FileSystemType, const KURL& rootURL);
- class DispatchCallbackTaskBase : public ExecutionContextTask {
- public:
- String taskNameForInstrumentation() const override
- {
- return "FileSystem";
- }
- };
+ static String taskNameForInstrumentation()
+ {
+ return "FileSystem";
+ }
template <typename CB, typename CBArg>
- class DispatchCallbackPtrArgTask final : public DispatchCallbackTaskBase {
+ class DispatchCallbackPtrArgTask final : public ExecutionContextTask {
public:
DispatchCallbackPtrArgTask(CB* callback, CBArg* arg)
: m_callback(callback)
@@ -134,7 +131,7 @@ private:
};
template <typename CB, typename CBArg>
- class DispatchCallbackNonPtrArgTask final : public DispatchCallbackTaskBase {
+ class DispatchCallbackNonPtrArgTask final : public ExecutionContextTask {
public:
DispatchCallbackNonPtrArgTask(CB* callback, const CBArg& arg)
: m_callback(callback)
@@ -153,7 +150,7 @@ private:
};
template <typename CB>
- class DispatchCallbackNoArgTask final : public DispatchCallbackTaskBase {
+ class DispatchCallbackNoArgTask final : public ExecutionContextTask {
public:
DispatchCallbackNoArgTask(CB* callback)
: m_callback(callback)
@@ -178,7 +175,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
{
ASSERT(executionContext->isContextThread());
if (callback)
- executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackPtrArgTask<CB, CBArg>(callback, arg)));
+ executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackPtrArgTask<CB, CBArg>(callback, arg)), taskNameForInstrumentation());
}
template <typename CB, typename CBArg>
@@ -186,7 +183,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
{
ASSERT(executionContext->isContextThread());
if (callback)
- executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, PersistentHeapVector<CBArg>>(callback, arg)));
+ executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, PersistentHeapVector<CBArg>>(callback, arg)), taskNameForInstrumentation());
}
template <typename CB, typename CBArg>
@@ -194,7 +191,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
{
ASSERT(executionContext->isContextThread());
if (callback)
- executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, CBArg>(callback, arg)));
+ executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, CBArg>(callback, arg)), taskNameForInstrumentation());
}
template <typename CB, typename CBArg>
@@ -202,7 +199,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
{
ASSERT(executionContext->isContextThread());
if (callback)
- executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, Persistent<CBArg>>(callback, arg)));
+ executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNonPtrArgTask<CB, Persistent<CBArg>>(callback, arg)), taskNameForInstrumentation());
}
template <typename CB>
@@ -210,7 +207,7 @@ void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal
{
ASSERT(executionContext->isContextThread());
if (callback)
- executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNoArgTask<CB>(callback)));
+ executionContext->postTask(BLINK_FROM_HERE, wrapUnique(new DispatchCallbackNoArgTask<CB>(callback)), taskNameForInstrumentation());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698