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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchDataLoader.h

Issue 2229313002: Make FetchDataLoader accept BytesConsumer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-c++-rs
Patch Set: fix Created 4 years, 4 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/modules/fetch/FetchDataLoader.h
diff --git a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
index 745ab2400bb2536959fda6c905a9a3fac0efad37..b44e72332aa096f70a63b64241eab4472dd4e6a5 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
@@ -15,17 +15,18 @@
namespace blink {
+class BytesConsumer;
+
// FetchDataLoader subclasses
-// 1. take a reader of FetchDataConsumerHandle |handle|,
+// 1. take a BytesConsumer,
// 2. read all data, and
// 3. call either didFetchDataLoaded...() on success or
// difFetchDataLoadFailed() otherwise
// on the thread where FetchDataLoader is created.
//
// - Client's methods can be called synchronously in start().
-// - If FetchDataLoader::cancel() is called (or FetchDataLoader is garbage
-// collected), Client's methods are not called anymore.
-// - FetchDataLoader takes the ownership of |handle|'s reader but not |handle|.
+// - If FetchDataLoader::cancel() is called, Client's methods will not be
+// called anymore.
class MODULES_EXPORT FetchDataLoader : public GarbageCollectedFinalized<FetchDataLoader> {
public:
class MODULES_EXPORT Client : public GarbageCollectedMixin {
@@ -64,10 +65,8 @@ public:
virtual ~FetchDataLoader() { }
- // start() should be called only once on the created thread.
- // start() do not take the ownership of |handle|.
- // |handle| must not be locked when called.
- virtual void start(FetchDataConsumerHandle* /* handle */, Client*) = 0;
+ // |consumer| must not have a client when called.
+ virtual void start(BytesConsumer* /* consumer */, Client*) = 0;
virtual void cancel() = 0;
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/BytesConsumer.h ('k') | third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698