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

Unified Diff: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.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, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
index b641cedb81f62461eeb1f997904da3d93647c2c8..2506af4e00842c49be6d5ccd8afc48e7940f5f76 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
@@ -207,7 +207,7 @@ public:
private:
DataConsumerHandle(const String& name, PassRefPtr<Context> context) : m_name(name.isolatedCopy()), m_context(context) { }
- Reader* obtainReaderInternal(Client*) { return new ReaderImpl(m_name, m_context); }
+ std::unique_ptr<Reader> obtainReader(Client*) { return WTF::wrapUnique(new ReaderImpl(m_name, m_context)); }
const char* debugName() const override { return "ThreadingTestBase::DataConsumerHandle"; }
const String m_name;
@@ -307,7 +307,7 @@ public:
class MockFetchDataConsumerHandle : public FetchDataConsumerHandle {
public:
static std::unique_ptr<::testing::StrictMock<MockFetchDataConsumerHandle>> create() { return wrapUnique(new ::testing::StrictMock<MockFetchDataConsumerHandle>); }
- MOCK_METHOD1(obtainReaderInternal, Reader*(Client*));
+ MOCK_METHOD1(obtainFetchDataReader, std::unique_ptr<Reader>(Client*));
private:
const char* debugName() const override { return "MockFetchDataConsumerHandle"; }
@@ -428,12 +428,12 @@ public:
};
Context* getContext() { return m_context.get(); }
+ std::unique_ptr<Reader> obtainReader(Client*) override;
private:
class ReaderImpl;
ReplayingHandle();
- Reader* obtainReaderInternal(Client*) override;
const char* debugName() const override { return "ReplayingHandle"; }
RefPtr<Context> m_context;

Powered by Google App Engine
This is Rietveld 408576698