OLD | NEW |
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 #include "content/child/shared_memory_data_consumer_handle.h" | 5 #include "content/child/shared_memory_data_consumer_handle.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 // Delete the data on the original thread. | 33 // Delete the data on the original thread. |
34 task_runner_->DeleteSoon(FROM_HERE, data_.release()); | 34 task_runner_->DeleteSoon(FROM_HERE, data_.release()); |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 const char* payload() const override { return data_->payload(); } | 38 const char* payload() const override { return data_->payload(); } |
39 int length() const override { return data_->length(); } | 39 int length() const override { return data_->length(); } |
40 int encoded_data_length() const override { | 40 int encoded_data_length() const override { |
41 return data_->encoded_data_length(); | 41 return data_->encoded_data_length(); |
42 } | 42 } |
43 int encoded_body_length() const override { | |
44 return data_->encoded_body_length(); | |
45 } | |
46 | 43 |
47 private: | 44 private: |
48 std::unique_ptr<RequestPeer::ReceivedData> data_; | 45 std::unique_ptr<RequestPeer::ReceivedData> data_; |
49 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 46 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
50 | 47 |
51 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData); | 48 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData); |
52 }; | 49 }; |
53 | 50 |
54 } // namespace | 51 } // namespace |
55 | 52 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 std::unique_ptr<blink::WebDataConsumerHandle::Reader> | 454 std::unique_ptr<blink::WebDataConsumerHandle::Reader> |
458 SharedMemoryDataConsumerHandle::obtainReader(Client* client) { | 455 SharedMemoryDataConsumerHandle::obtainReader(Client* client) { |
459 return base::WrapUnique(new ReaderImpl(context_, client)); | 456 return base::WrapUnique(new ReaderImpl(context_, client)); |
460 } | 457 } |
461 | 458 |
462 const char* SharedMemoryDataConsumerHandle::debugName() const { | 459 const char* SharedMemoryDataConsumerHandle::debugName() const { |
463 return "SharedMemoryDataConsumerHandle"; | 460 return "SharedMemoryDataConsumerHandle"; |
464 } | 461 } |
465 | 462 |
466 } // namespace content | 463 } // namespace content |
OLD | NEW |