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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: Addressed comments from kinuko and haraken 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/fetch/BodyStreamBuffer.h" 5 #include "modules/fetch/BodyStreamBuffer.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/V8PrivateProperty.h" 9 #include "bindings/core/v8/V8PrivateProperty.h"
10 #include "bindings/core/v8/V8ThrowException.h" 10 #include "bindings/core/v8/V8ThrowException.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override { 45 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override {
46 buffer_->EndLoading(); 46 buffer_->EndLoading();
47 client_->DidFetchDataLoadedArrayBuffer(array_buffer); 47 client_->DidFetchDataLoadedArrayBuffer(array_buffer);
48 } 48 }
49 49
50 void DidFetchDataLoadedString(const String& string) override { 50 void DidFetchDataLoadedString(const String& string) override {
51 buffer_->EndLoading(); 51 buffer_->EndLoading();
52 client_->DidFetchDataLoadedString(string); 52 client_->DidFetchDataLoadedString(string);
53 } 53 }
54 54
55 void DidFetchDataLoadedStream() override { 55 void DidFetchDataLoadedDataPipe() override {
56 buffer_->EndLoading(); 56 buffer_->EndLoading();
57 client_->DidFetchDataLoadedStream(); 57 client_->DidFetchDataLoadedDataPipe();
58 } 58 }
59 59
60 void DidFetchDataLoadedCustomFormat() override { 60 void DidFetchDataLoadedCustomFormat() override {
61 buffer_->EndLoading(); 61 buffer_->EndLoading();
62 client_->DidFetchDataLoadedCustomFormat(); 62 client_->DidFetchDataLoadedCustomFormat();
63 } 63 }
64 64
65 void DidFetchDataLoadFailed() override { 65 void DidFetchDataLoadFailed() override {
66 buffer_->EndLoading(); 66 buffer_->EndLoading();
67 client_->DidFetchDataLoadFailed(); 67 client_->DidFetchDataLoadFailed();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 if (is_errored) 389 if (is_errored)
390 return BytesConsumer::CreateErrored(BytesConsumer::Error("error")); 390 return BytesConsumer::CreateErrored(BytesConsumer::Error("error"));
391 391
392 DCHECK(consumer); 392 DCHECK(consumer);
393 consumer->ClearClient(); 393 consumer->ClearClient();
394 return consumer; 394 return consumer;
395 } 395 }
396 396
397 } // namespace blink 397 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698