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

Side by Side Diff: content/child/web_data_consumer_handle_impl.cc

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 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 "content/child/web_data_consumer_handle_impl.h" 5 #include "content/child/web_data_consumer_handle_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <utility> 10 #include <utility>
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 client_->didGetReadable(); 120 client_->didGetReadable();
121 } 121 }
122 122
123 WebDataConsumerHandleImpl::WebDataConsumerHandleImpl(Handle handle) 123 WebDataConsumerHandleImpl::WebDataConsumerHandleImpl(Handle handle)
124 : context_(new Context(std::move(handle))) {} 124 : context_(new Context(std::move(handle))) {}
125 125
126 WebDataConsumerHandleImpl::~WebDataConsumerHandleImpl() { 126 WebDataConsumerHandleImpl::~WebDataConsumerHandleImpl() {
127 } 127 }
128 128
129 std::unique_ptr<blink::WebDataConsumerHandle::Reader> 129 std::unique_ptr<blink::WebDataConsumerHandle::Reader>
130 WebDataConsumerHandleImpl::ObtainReader(Client* client) { 130 WebDataConsumerHandleImpl::obtainReader(Client* client) {
131 return base::WrapUnique(obtainReaderInternal(client)); 131 return base::WrapUnique(new ReaderImpl(context_, client));
132 }
133
134 WebDataConsumerHandleImpl::ReaderImpl*
135 WebDataConsumerHandleImpl::obtainReaderInternal(Client* client) {
136 return new ReaderImpl(context_, client);
137 } 132 }
138 133
139 const char* WebDataConsumerHandleImpl::debugName() const { 134 const char* WebDataConsumerHandleImpl::debugName() const {
140 return "WebDataConsumerHandleImpl"; 135 return "WebDataConsumerHandleImpl";
141 } 136 }
142 137
143 } // namespace content 138 } // namespace content
OLDNEW
« no previous file with comments | « content/child/web_data_consumer_handle_impl.h ('k') | content/child/web_data_consumer_handle_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698