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

Unified Diff: Source/core/page/NetworkStateNotifierTest.cpp

Issue 705003002: Change the return type of WTF::bind() to |OwnPtr<Function>| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments from yhirano Created 6 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
« no previous file with comments | « Source/core/loader/WorkerLoaderClientBridgeSyncHelper.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/NetworkStateNotifierTest.cpp
diff --git a/Source/core/page/NetworkStateNotifierTest.cpp b/Source/core/page/NetworkStateNotifierTest.cpp
index 4a47f32dda78a8965a0182b75fbc1b0ee4fd6d9d..44f307da2be01ebaeca8f7a95c9ac27bd2e16ea8 100644
--- a/Source/core/page/NetworkStateNotifierTest.cpp
+++ b/Source/core/page/NetworkStateNotifierTest.cpp
@@ -53,8 +53,8 @@ public:
m_observedType = type;
m_callbackCount += 1;
- if (!m_closure.isNull())
- m_closure();
+ if (m_closure && !m_closure->isNull())
+ (*m_closure)();
}
blink::WebConnectionType observedType() const
@@ -67,13 +67,13 @@ public:
return m_callbackCount;
}
- void setNotificationCallback(const Closure& closure)
+ void setNotificationCallback(PassOwnPtr<Closure> closure)
{
m_closure = closure;
}
private:
- Closure m_closure;
+ OwnPtr<Closure> m_closure;
blink::WebConnectionType m_observedType;
int m_callbackCount;
};
« no previous file with comments | « Source/core/loader/WorkerLoaderClientBridgeSyncHelper.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698