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

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReaderLoader.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/fileapi/FileReaderLoader.h
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
index 66060e06d903a28dac6060f2250117f95a618800..9d5f4533f3c87e6528eb492e78dadbe151d4748a 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.h
@@ -36,10 +36,11 @@
#include "core/loader/ThreadableLoaderClient.h"
#include "platform/weborigin/KURL.h"
#include "wtf/Forward.h"
-#include "wtf/OwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/text/TextEncoding.h"
#include "wtf/text/WTFString.h"
#include "wtf/typed_arrays/ArrayBufferBuilder.h"
+#include <memory>
namespace blink {
@@ -63,9 +64,9 @@ public:
};
// If client is given, do the loading asynchronously. Otherwise, load synchronously.
- static PassOwnPtr<FileReaderLoader> create(ReadType readType, FileReaderLoaderClient* client)
+ static std::unique_ptr<FileReaderLoader> create(ReadType readType, FileReaderLoaderClient* client)
{
- return adoptPtr(new FileReaderLoader(readType, client));
+ return wrapUnique(new FileReaderLoader(readType, client));
}
FileReaderLoader(ReadType, FileReaderLoaderClient*);
@@ -76,7 +77,7 @@ public:
void cancel();
// ThreadableLoaderClient
- void didReceiveResponse(unsigned long, const ResourceResponse&, PassOwnPtr<WebDataConsumerHandle>) override;
+ void didReceiveResponse(unsigned long, const ResourceResponse&, std::unique_ptr<WebDataConsumerHandle>) override;
void didReceiveData(const char*, unsigned) override;
void didFinishLoading(unsigned long, double) override;
void didFail(const ResourceError&) override;
@@ -122,15 +123,15 @@ private:
KURL m_urlForReading;
bool m_urlForReadingIsStream;
- OwnPtr<ThreadableLoader> m_loader;
+ std::unique_ptr<ThreadableLoader> m_loader;
- OwnPtr<ArrayBufferBuilder> m_rawData;
+ std::unique_ptr<ArrayBufferBuilder> m_rawData;
bool m_isRawDataConverted;
String m_stringResult;
// The decoder used to decode the text data.
- OwnPtr<TextResourceDecoder> m_decoder;
+ std::unique_ptr<TextResourceDecoder> m_decoder;
bool m_finishedLoading;
long long m_bytesLoaded;
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReader.h ('k') | third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698