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

Unified Diff: third_party/WebKit/Source/core/html/parser/PreloadRequest.h

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/core/html/parser/PreloadRequest.h
diff --git a/third_party/WebKit/Source/core/html/parser/PreloadRequest.h b/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
index cb0932d17da7e31390656d7977793318f4c47dd5..9154fff2d31c5d8b9b0f90f1b10898bc017d8944 100644
--- a/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
+++ b/third_party/WebKit/Source/core/html/parser/PreloadRequest.h
@@ -12,7 +12,9 @@
#include "platform/CrossOriginAttributeValue.h"
#include "platform/weborigin/SecurityPolicy.h"
#include "wtf/Allocator.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/TextPosition.h"
+#include <memory>
namespace blink {
@@ -23,9 +25,9 @@ class PreloadRequest {
public:
enum RequestType { RequestTypePreload, RequestTypePreconnect, RequestTypeLinkRelPreload };
- static PassOwnPtr<PreloadRequest> create(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const ReferrerPolicy referrerPolicy, const FetchRequest::ResourceWidth& resourceWidth = FetchRequest::ResourceWidth(), const ClientHintsPreferences& clientHintsPreferences = ClientHintsPreferences(), RequestType requestType = RequestTypePreload)
+ static std::unique_ptr<PreloadRequest> create(const String& initiatorName, const TextPosition& initiatorPosition, const String& resourceURL, const KURL& baseURL, Resource::Type resourceType, const ReferrerPolicy referrerPolicy, const FetchRequest::ResourceWidth& resourceWidth = FetchRequest::ResourceWidth(), const ClientHintsPreferences& clientHintsPreferences = ClientHintsPreferences(), RequestType requestType = RequestTypePreload)
{
- return adoptPtr(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth, clientHintsPreferences, requestType, referrerPolicy));
+ return wrapUnique(new PreloadRequest(initiatorName, initiatorPosition, resourceURL, baseURL, resourceType, resourceWidth, clientHintsPreferences, requestType, referrerPolicy));
}
bool isSafeToSendToAnotherThread() const;
@@ -104,7 +106,7 @@ private:
IntegrityMetadataSet m_integrityMetadata;
};
-typedef Vector<OwnPtr<PreloadRequest>> PreloadRequestStream;
+typedef Vector<std::unique_ptr<PreloadRequest>> PreloadRequestStream;
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698