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

Unified Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.h

Issue 1274063003: [Loader] Make ThreadableLoader non-RefCounted and be managed by OwnPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments. Created 4 years, 10 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/loader/ThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoader.h b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
index ed543329ff81af30b73b7001221bf65f6c917666..b1ea4904cd05c035415ba324d0b654e55fb7a95b 100644
--- a/third_party/WebKit/Source/core/loader/ThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/ThreadableLoader.h
@@ -36,9 +36,7 @@
#include "platform/CrossThreadCopier.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
+#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -128,7 +126,7 @@ struct CrossThreadCopier<ThreadableLoaderOptions> {
// - ResourceLoaderOptions argument will be passed to the FetchRequest
// that this ThreadableLoader creates. It can be altered e.g. when
// redirect happens.
-class CORE_EXPORT ThreadableLoader : public RefCounted<ThreadableLoader> {
+class CORE_EXPORT ThreadableLoader {
WTF_MAKE_NONCOPYABLE(ThreadableLoader);
public:
// ThreadableLoaderClient methods may not destroy the ThreadableLoader
@@ -168,8 +166,8 @@ public:
// ThreadableLoaderClient methods:
// - may call cancel()
// - can destroy the ThreadableLoader instance in them (by clearing
- // RefPtr<ThreadableLoader>).
- static PassRefPtr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+ // OwnPtr<ThreadableLoader>).
+ static PassOwnPtr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
// The methods on the ThreadableLoaderClient passed on create() call
// may be called synchronous to start() call.

Powered by Google App Engine
This is Rietveld 408576698