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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerScriptLoader.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (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/core/workers/WorkerScriptLoader.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
index eae83c0e523583d6a28039edd59ca0439add254d..0b46670808c23e59824e4be8085d8dd682343aa3 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
@@ -37,10 +37,10 @@
#include "public/platform/WebURLRequest.h"
#include "wtf/Allocator.h"
#include "wtf/Functional.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/text/StringBuilder.h"
-#include <memory>
namespace blink {
@@ -76,7 +76,7 @@ public:
unsigned long identifier() const { return m_identifier; }
long long appCacheID() const { return m_appCacheID; }
- std::unique_ptr<Vector<char>> releaseCachedMetadata() { return std::move(m_cachedMetadata); }
+ PassOwnPtr<Vector<char>> releaseCachedMetadata() { return std::move(m_cachedMetadata); }
const Vector<char>* cachedMetadata() const { return m_cachedMetadata.get(); }
ContentSecurityPolicy* contentSecurityPolicy() { return m_contentSecurityPolicy.get(); }
@@ -87,7 +87,7 @@ public:
const Vector<String>* originTrialTokens() const { return m_originTrialTokens.get(); }
// ThreadableLoaderClient
- void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&, std::unique_ptr<WebDataConsumerHandle>) override;
+ void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&, PassOwnPtr<WebDataConsumerHandle>) override;
void didReceiveData(const char* data, unsigned dataLength) override;
void didReceiveCachedMetadata(const char*, int /*dataLength*/) override;
void didFinishLoading(unsigned long identifier, double) override;
@@ -112,9 +112,9 @@ private:
std::unique_ptr<SameThreadClosure> m_responseCallback;
std::unique_ptr<SameThreadClosure> m_finishedCallback;
- std::unique_ptr<ThreadableLoader> m_threadableLoader;
+ OwnPtr<ThreadableLoader> m_threadableLoader;
String m_responseEncoding;
- std::unique_ptr<TextResourceDecoder> m_decoder;
+ OwnPtr<TextResourceDecoder> m_decoder;
StringBuilder m_script;
KURL m_url;
KURL m_responseURL;
@@ -122,7 +122,7 @@ private:
bool m_needToCancel;
unsigned long m_identifier;
long long m_appCacheID;
- std::unique_ptr<Vector<char>> m_cachedMetadata;
+ OwnPtr<Vector<char>> m_cachedMetadata;
WebURLRequest::RequestContext m_requestContext;
Persistent<ContentSecurityPolicy> m_contentSecurityPolicy;
WebAddressSpace m_responseAddressSpace;

Powered by Google App Engine
This is Rietveld 408576698