Index: third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
index d70c05e9a1b3dedbdb8e62285e40356d1a19173e..9971e96878fff495f6dacfabbc06d5c29c9e3256 100644 |
--- a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp |
@@ -50,15 +50,13 @@ |
#include "public/web/WebSharedWorkerCreationErrors.h" |
#include "public/web/WebSharedWorkerRepositoryClient.h" |
#include "web/WebLocalFrameImpl.h" |
-#include "wtf/PtrUtil.h" |
-#include <memory> |
namespace blink { |
// Callback class that keeps the SharedWorker and WebSharedWorker objects alive while connecting. |
class SharedWorkerConnector : private WebSharedWorkerConnector::ConnectListener { |
public: |
- SharedWorkerConnector(SharedWorker* worker, const KURL& url, const String& name, WebMessagePortChannelUniquePtr channel, std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector) |
+ SharedWorkerConnector(SharedWorker* worker, const KURL& url, const String& name, WebMessagePortChannelUniquePtr channel, PassOwnPtr<WebSharedWorkerConnector> webWorkerConnector) |
: m_worker(worker) |
, m_url(url) |
, m_name(name) |
@@ -76,7 +74,7 @@ private: |
Persistent<SharedWorker> m_worker; |
KURL m_url; |
String m_name; |
- std::unique_ptr<WebSharedWorkerConnector> m_webWorkerConnector; |
+ OwnPtr<WebSharedWorkerConnector> m_webWorkerConnector; |
WebMessagePortChannelUniquePtr m_channel; |
}; |
@@ -122,7 +120,7 @@ void SharedWorkerRepositoryClientImpl::connect(SharedWorker* worker, WebMessageP |
// when multiple might have been sent. Fix by making the |
// SharedWorkerConnector interface take a map that can contain |
// multiple headers. |
- std::unique_ptr<Vector<CSPHeaderAndType>> headers = worker->getExecutionContext()->contentSecurityPolicy()->headers(); |
+ OwnPtr<Vector<CSPHeaderAndType>> headers = worker->getExecutionContext()->contentSecurityPolicy()->headers(); |
WebString header; |
WebContentSecurityPolicyType headerType = WebContentSecurityPolicyTypeReport; |
@@ -134,7 +132,7 @@ void SharedWorkerRepositoryClientImpl::connect(SharedWorker* worker, WebMessageP |
WebWorkerCreationError creationError; |
String unusedSecureContextError; |
bool isSecureContext = worker->getExecutionContext()->isSecureContext(unusedSecureContextError); |
- std::unique_ptr<WebSharedWorkerConnector> webWorkerConnector = wrapUnique(m_client->createSharedWorkerConnector(url, name, getId(document), header, headerType, worker->getExecutionContext()->securityContext().addressSpace(), isSecureContext ? WebSharedWorkerCreationContextTypeSecure : WebSharedWorkerCreationContextTypeNonsecure, &creationError)); |
+ OwnPtr<WebSharedWorkerConnector> webWorkerConnector = adoptPtr(m_client->createSharedWorkerConnector(url, name, getId(document), header, headerType, worker->getExecutionContext()->securityContext().addressSpace(), isSecureContext ? WebSharedWorkerCreationContextTypeSecure : WebSharedWorkerCreationContextTypeNonsecure, &creationError)); |
if (creationError != WebWorkerCreationErrorNone) { |
if (creationError == WebWorkerCreationErrorURLMismatch) { |
// Existing worker does not match this url, so return an error back to the caller. |