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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/CompositeDataConsumerHandle.h

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 #ifndef CompositeDataConsumerHandle_h 5 #ifndef CompositeDataConsumerHandle_h
6 #define CompositeDataConsumerHandle_h 6 #define CompositeDataConsumerHandle_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebDataConsumerHandle.h" 10 #include "public/platform/WebDataConsumerHandle.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static std::unique_ptr<WebDataConsumerHandle> create(std::unique_ptr<WebData ConsumerHandle> handle, T* updater) 49 static std::unique_ptr<WebDataConsumerHandle> create(std::unique_ptr<WebData ConsumerHandle> handle, T* updater)
50 { 50 {
51 ASSERT(handle); 51 ASSERT(handle);
52 Updater* u = nullptr; 52 Updater* u = nullptr;
53 std::unique_ptr<CompositeDataConsumerHandle> p = wrapUnique(new Composit eDataConsumerHandle(std::move(handle), &u)); 53 std::unique_ptr<CompositeDataConsumerHandle> p = wrapUnique(new Composit eDataConsumerHandle(std::move(handle), &u));
54 *updater = u; 54 *updater = u;
55 return std::move(p); 55 return std::move(p);
56 } 56 }
57 ~CompositeDataConsumerHandle() override; 57 ~CompositeDataConsumerHandle() override;
58 58
59 std::unique_ptr<Reader> obtainReader(Client*) override;
60
59 private: 61 private:
60 class ReaderImpl; 62 class ReaderImpl;
61 Reader* obtainReaderInternal(Client*) override;
62 63
63 const char* debugName() const override { return "CompositeDataConsumerHandle "; } 64 const char* debugName() const override { return "CompositeDataConsumerHandle "; }
64 65
65 CompositeDataConsumerHandle(std::unique_ptr<WebDataConsumerHandle>, Updater* *); 66 CompositeDataConsumerHandle(std::unique_ptr<WebDataConsumerHandle>, Updater* *);
66 67
67 RefPtr<Context> m_context; 68 RefPtr<Context> m_context;
68 }; 69 };
69 70
70 } // namespace blink 71 } // namespace blink
71 72
72 #endif // CompositeDataConsumerHandle_h 73 #endif // CompositeDataConsumerHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698