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

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

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Used TEST_P to test closing the connection first and On{Aborted,Completed} first Created 3 years, 8 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 e2b4d837d30932d7aaab7914f9d661ff6f6ee2a7..7a1e16f554092109e689271a2bee534ff725a958 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
@@ -8,6 +8,7 @@
#include "core/dom/DOMArrayBuffer.h"
#include "core/streams/Stream.h"
#include "modules/ModulesExport.h"
+#include "mojo/public/cpp/system/data_pipe.h"
#include "platform/blob/BlobData.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
@@ -35,17 +36,15 @@ class MODULES_EXPORT FetchDataLoader
// The method corresponding to createLoaderAs... is called on success.
virtual void didFetchDataLoadedBlobHandle(PassRefPtr<BlobDataHandle>) {
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
virtual void didFetchDataLoadedArrayBuffer(DOMArrayBuffer*) {
- ASSERT_NOT_REACHED();
- }
- virtual void didFetchDataLoadedString(const String&) {
- ASSERT_NOT_REACHED();
+ NOTREACHED();
}
+ virtual void didFetchDataLoadedString(const String&) { NOTREACHED(); }
// This is called after all data are read from |handle| and written
- // to |outStream|, and |outStream| is closed or aborted.
- virtual void didFetchDataLoadedStream() { ASSERT_NOT_REACHED(); }
+ // to |outDataPipe|, and |outDataPipe| is closed or aborted.
+ virtual void didFetchDataLoadedDataPipe() { NOTREACHED(); }
virtual void didFetchDataLoadFailed() = 0;
@@ -55,7 +54,8 @@ class MODULES_EXPORT FetchDataLoader
static FetchDataLoader* createLoaderAsBlobHandle(const String& mimeType);
static FetchDataLoader* createLoaderAsArrayBuffer();
static FetchDataLoader* createLoaderAsString();
- static FetchDataLoader* createLoaderAsStream(Stream* outStream);
+ static FetchDataLoader* createLoaderAsDataPipe(
+ mojo::ScopedDataPipeProducerHandle outDataPipe);
virtual ~FetchDataLoader() {}

Powered by Google App Engine
This is Rietveld 408576698