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

Unified Diff: third_party/WebKit/public/platform/WebMessagePortChannel.h

Issue 2043583002: Remove the use of OwnedPtrDeleter in WebMessagePortChannel. (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
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebMessagePortChannel.h
diff --git a/third_party/WebKit/public/platform/WebMessagePortChannel.h b/third_party/WebKit/public/platform/WebMessagePortChannel.h
index 6fce4e7a8831b443b2d5b3458cf91b181e717b58..e6e1da4b455c4141531418ab11249cc116dfbb9c 100644
--- a/third_party/WebKit/public/platform/WebMessagePortChannel.h
+++ b/third_party/WebKit/public/platform/WebMessagePortChannel.h
@@ -34,6 +34,10 @@
#include "WebCommon.h"
#include "WebVector.h"
+#if INSIDE_BLINK
+#include <memory>
+#endif
+
namespace blink {
class WebMessagePortChannelClient;
@@ -56,23 +60,20 @@ protected:
~WebMessagePortChannel() { }
};
-} // namespace blink
-
#if INSIDE_BLINK
-namespace WTF {
-
-template<typename T> struct OwnedPtrDeleter;
-template<> struct OwnedPtrDeleter<blink::WebMessagePortChannel> {
- static void deletePtr(blink::WebMessagePortChannel* channel)
+struct WebMessagePortChannelDeleter {
+ void operator()(WebMessagePortChannel* channel)
{
if (channel)
channel->destroy();
}
};
-} // namespace WTF
+using WebMessagePortChannelUniquePtr = std::unique_ptr<WebMessagePortChannel, WebMessagePortChannelDeleter>;
#endif // INSIDE_BLINK
+} // namespace blink
+
#endif // WebMessagePortChannel_h
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698