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

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

Issue 2172183003: Return unique_ptr<WebDataConsumerHandle::Reader> directly from obtainReader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmock_cxx11
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ReadableStreamDataConsumerHandle.h" 5 #include "modules/fetch/ReadableStreamDataConsumerHandle.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/ScriptFunction.h" 9 #include "bindings/core/v8/ScriptFunction.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool m_isDone; 286 bool m_isDone;
287 bool m_hasError; 287 bool m_hasError;
288 }; 288 };
289 289
290 ReadableStreamDataConsumerHandle::ReadableStreamDataConsumerHandle(ScriptState* scriptState, ScriptValue streamReader) 290 ReadableStreamDataConsumerHandle::ReadableStreamDataConsumerHandle(ScriptState* scriptState, ScriptValue streamReader)
291 : m_readingContext(ReadingContext::create(scriptState, streamReader)) 291 : m_readingContext(ReadingContext::create(scriptState, streamReader))
292 { 292 {
293 } 293 }
294 ReadableStreamDataConsumerHandle::~ReadableStreamDataConsumerHandle() = default; 294 ReadableStreamDataConsumerHandle::~ReadableStreamDataConsumerHandle() = default;
295 295
296 FetchDataConsumerHandle::Reader* ReadableStreamDataConsumerHandle::obtainReaderI nternal(Client* client) 296 std::unique_ptr<FetchDataConsumerHandle::Reader> ReadableStreamDataConsumerHandl e::obtainFetchDataReader(Client* client)
297 { 297 {
298 return new ReadingContext::ReaderImpl(m_readingContext, client); 298 return WTF::wrapUnique(new ReadingContext::ReaderImpl(m_readingContext, clie nt));
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698