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

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: Updated comments 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override { 44 void DidFetchDataLoadedArrayBuffer(DOMArrayBuffer* array_buffer) override {
45 buffer_->EndLoading(); 45 buffer_->EndLoading();
46 client_->DidFetchDataLoadedArrayBuffer(array_buffer); 46 client_->DidFetchDataLoadedArrayBuffer(array_buffer);
47 } 47 }
48 48
49 void DidFetchDataLoadedString(const String& string) override { 49 void DidFetchDataLoadedString(const String& string) override {
50 buffer_->EndLoading(); 50 buffer_->EndLoading();
51 client_->DidFetchDataLoadedString(string); 51 client_->DidFetchDataLoadedString(string);
52 } 52 }
53 53
54 void DidFetchDataLoadedStream() override { 54 void DidFetchDataLoadedDataPipe() override {
55 buffer_->EndLoading(); 55 buffer_->EndLoading();
56 client_->DidFetchDataLoadedStream(); 56 client_->DidFetchDataLoadedDataPipe();
57 } 57 }
58 58
59 void DidFetchDataLoadedCustomFormat() override { 59 void DidFetchDataLoadedCustomFormat() override {
60 buffer_->EndLoading(); 60 buffer_->EndLoading();
61 client_->DidFetchDataLoadedCustomFormat(); 61 client_->DidFetchDataLoadedCustomFormat();
62 } 62 }
63 63
64 void DidFetchDataLoadFailed() override { 64 void DidFetchDataLoadFailed() override {
65 buffer_->EndLoading(); 65 buffer_->EndLoading();
66 client_->DidFetchDataLoadFailed(); 66 client_->DidFetchDataLoadFailed();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 387 }
388 if (is_errored) 388 if (is_errored)
389 return BytesConsumer::CreateErrored(BytesConsumer::Error("error")); 389 return BytesConsumer::CreateErrored(BytesConsumer::Error("error"));
390 390
391 DCHECK(consumer); 391 DCHECK(consumer);
392 consumer->ClearClient(); 392 consumer->ClearClient();
393 return consumer; 393 return consumer;
394 } 394 }
395 395
396 } // namespace blink 396 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698