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

Unified Diff: third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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/websockets/DOMWebSocket.cpp
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
index 8a008b845029155eff9d61c4cc38b02ebac3e705..b30348d408ffac02a2f1c89da3292893ffdff40b 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
@@ -58,11 +58,11 @@
#include "public/platform/WebInsecureRequestPolicy.h"
#include "wtf/Assertions.h"
#include "wtf/HashSet.h"
-#include "wtf/PassOwnPtr.h"
#include "wtf/StdLibExtras.h"
#include "wtf/text/CString.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
+#include <memory>
namespace blink {
@@ -638,7 +638,7 @@ void DOMWebSocket::didReceiveTextMessage(const String& msg)
m_eventQueue->dispatch(MessageEvent::create(msg, SecurityOrigin::create(m_url)->toString()));
}
-void DOMWebSocket::didReceiveBinaryMessage(PassOwnPtr<Vector<char>> binaryData)
+void DOMWebSocket::didReceiveBinaryMessage(std::unique_ptr<Vector<char>> binaryData)
{
WTF_LOG(Network, "WebSocket %p didReceiveBinaryMessage() %lu byte binary message", this, static_cast<unsigned long>(binaryData->size()));
switch (m_binaryType) {
@@ -646,7 +646,7 @@ void DOMWebSocket::didReceiveBinaryMessage(PassOwnPtr<Vector<char>> binaryData)
size_t size = binaryData->size();
RefPtr<RawData> rawData = RawData::create();
binaryData->swap(*rawData->mutableData());
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->appendData(rawData.release(), 0, BlobDataItem::toEndOfFile);
Blob* blob = Blob::create(BlobDataHandle::create(std::move(blobData), size));
recordReceiveTypeHistogram(WebSocketReceiveTypeBlob);

Powered by Google App Engine
This is Rietveld 408576698