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

Unified Diff: third_party/WebKit/Source/web/AssociatedURLLoader.cpp

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/web/AssociatedURLLoader.cpp
diff --git a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
index a740f026f7a04fa89997ad82c336fe348033104c..008e332e627301cd3813564acfaaae509e9f102a 100644
--- a/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
+++ b/third_party/WebKit/Source/web/AssociatedURLLoader.cpp
@@ -48,10 +48,8 @@
#include "public/web/WebDataSource.h"
#include "web/WebLocalFrameImpl.h"
#include "wtf/HashSet.h"
-#include "wtf/PtrUtil.h"
#include "wtf/text/WTFString.h"
#include <limits.h>
-#include <memory>
namespace blink {
@@ -81,11 +79,11 @@ void HTTPRequestHeaderValidator::visitHeader(const WebString& name, const WebStr
class AssociatedURLLoader::ClientAdapter final : public DocumentThreadableLoaderClient {
WTF_MAKE_NONCOPYABLE(ClientAdapter);
public:
- static std::unique_ptr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderClient*, const WebURLLoaderOptions&);
+ static PassOwnPtr<ClientAdapter> create(AssociatedURLLoader*, WebURLLoaderClient*, const WebURLLoaderOptions&);
// ThreadableLoaderClient
void didSendData(unsigned long long /*bytesSent*/, unsigned long long /*totalBytesToBeSent*/) override;
- void didReceiveResponse(unsigned long, const ResourceResponse&, std::unique_ptr<WebDataConsumerHandle>) override;
+ void didReceiveResponse(unsigned long, const ResourceResponse&, PassOwnPtr<WebDataConsumerHandle>) override;
void didDownloadData(int /*dataLength*/) override;
void didReceiveData(const char*, unsigned /*dataLength*/) override;
void didReceiveCachedMetadata(const char*, int /*dataLength*/) override;
@@ -125,9 +123,9 @@ private:
bool m_didFail;
};
-std::unique_ptr<AssociatedURLLoader::ClientAdapter> AssociatedURLLoader::ClientAdapter::create(AssociatedURLLoader* loader, WebURLLoaderClient* client, const WebURLLoaderOptions& options)
+PassOwnPtr<AssociatedURLLoader::ClientAdapter> AssociatedURLLoader::ClientAdapter::create(AssociatedURLLoader* loader, WebURLLoaderClient* client, const WebURLLoaderOptions& options)
{
- return wrapUnique(new ClientAdapter(loader, client, options));
+ return adoptPtr(new ClientAdapter(loader, client, options));
}
AssociatedURLLoader::ClientAdapter::ClientAdapter(AssociatedURLLoader* loader, WebURLLoaderClient* client, const WebURLLoaderOptions& options)
@@ -160,7 +158,7 @@ void AssociatedURLLoader::ClientAdapter::didSendData(unsigned long long bytesSen
m_client->didSendData(m_loader, bytesSent, totalBytesToBeSent);
}
-void AssociatedURLLoader::ClientAdapter::didReceiveResponse(unsigned long, const ResourceResponse& response, std::unique_ptr<WebDataConsumerHandle> handle)
+void AssociatedURLLoader::ClientAdapter::didReceiveResponse(unsigned long, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
{
ASSERT_UNUSED(handle, !handle);
if (!m_client)
« no previous file with comments | « third_party/WebKit/Source/web/AssociatedURLLoader.h ('k') | third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698