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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.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/FetchBlobDataConsumerHandle.h" 5 #include "modules/fetch/FetchBlobDataConsumerHandle.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/fetch/FetchInitiatorTypeNames.h" 8 #include "core/fetch/FetchInitiatorTypeNames.h"
9 #include "core/loader/ThreadableLoaderClient.h" 9 #include "core/loader/ThreadableLoaderClient.h"
10 #include "modules/fetch/CompositeDataConsumerHandle.h" 10 #include "modules/fetch/CompositeDataConsumerHandle.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 std::unique_ptr<FetchDataConsumerHandle> FetchBlobDataConsumerHandle::create(Exe cutionContext* executionContext, PassRefPtr<BlobDataHandle> blobDataHandle) 303 std::unique_ptr<FetchDataConsumerHandle> FetchBlobDataConsumerHandle::create(Exe cutionContext* executionContext, PassRefPtr<BlobDataHandle> blobDataHandle)
304 { 304 {
305 if (!blobDataHandle) 305 if (!blobDataHandle)
306 return createFetchDataConsumerHandleFromWebHandle(createDoneDataConsumer Handle()); 306 return createFetchDataConsumerHandleFromWebHandle(createDoneDataConsumer Handle());
307 307
308 return wrapUnique(new FetchBlobDataConsumerHandle(executionContext, blobData Handle, new DefaultLoaderFactory)); 308 return wrapUnique(new FetchBlobDataConsumerHandle(executionContext, blobData Handle, new DefaultLoaderFactory));
309 } 309 }
310 310
311 FetchDataConsumerHandle::Reader* FetchBlobDataConsumerHandle::obtainReaderIntern al(Client* client) 311 std::unique_ptr<FetchDataConsumerHandle::Reader> FetchBlobDataConsumerHandle::ob tainFetchDataReader(Client* client)
312 { 312 {
313 return m_readerContext->obtainReader(client).release(); 313 return m_readerContext->obtainReader(client);
314 } 314 }
315 315
316 } // namespace blink 316 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698