| 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 19 matching lines...) Expand all Loading... |
| 30 friend class base::RefCountedThreadSafe<Context>; | 30 friend class base::RefCountedThreadSafe<Context>; |
| 31 ~Context() {} | 31 ~Context() {} |
| 32 Handle handle_; | 32 Handle handle_; |
| 33 | 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(Context); | 34 DISALLOW_COPY_AND_ASSIGN(Context); |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 WebDataConsumerHandleImpl::ReaderImpl::ReaderImpl( | 37 WebDataConsumerHandleImpl::ReaderImpl::ReaderImpl( |
| 38 scoped_refptr<Context> context, | 38 scoped_refptr<Context> context, |
| 39 Client* client) | 39 Client* client) |
| 40 : context_(context), client_(client) { | 40 : context_(context), handle_watcher_(FROM_HERE), client_(client) { |
| 41 if (client_) | 41 if (client_) |
| 42 StartWatching(); | 42 StartWatching(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 WebDataConsumerHandleImpl::ReaderImpl::~ReaderImpl() { | 45 WebDataConsumerHandleImpl::ReaderImpl::~ReaderImpl() { |
| 46 } | 46 } |
| 47 | 47 |
| 48 Result WebDataConsumerHandleImpl::ReaderImpl::read(void* data, | 48 Result WebDataConsumerHandleImpl::ReaderImpl::read(void* data, |
| 49 size_t size, | 49 size_t size, |
| 50 Flags flags, | 50 Flags flags, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 std::unique_ptr<blink::WebDataConsumerHandle::Reader> | 149 std::unique_ptr<blink::WebDataConsumerHandle::Reader> |
| 150 WebDataConsumerHandleImpl::obtainReader(Client* client) { | 150 WebDataConsumerHandleImpl::obtainReader(Client* client) { |
| 151 return base::WrapUnique(new ReaderImpl(context_, client)); | 151 return base::WrapUnique(new ReaderImpl(context_, client)); |
| 152 } | 152 } |
| 153 | 153 |
| 154 const char* WebDataConsumerHandleImpl::debugName() const { | 154 const char* WebDataConsumerHandleImpl::debugName() const { |
| 155 return "WebDataConsumerHandleImpl"; | 155 return "WebDataConsumerHandleImpl"; |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace content | 158 } // namespace content |
| OLD | NEW |