| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |