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

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

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: 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 unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 ~DelegateThreadSafeReceivedData() override { 31 ~DelegateThreadSafeReceivedData() override {
32 if (!task_runner_->BelongsToCurrentThread()) { 32 if (!task_runner_->BelongsToCurrentThread()) {
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_length() const override { return data_->encoded_length(); } 40 int encoded_length() const override { return data_->encoded_length(); }
41 int encoded_body_length() const override {
42 return data_->encoded_body_length();
43 }
41 44
42 private: 45 private:
43 std::unique_ptr<RequestPeer::ReceivedData> data_; 46 std::unique_ptr<RequestPeer::ReceivedData> data_;
44 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 47 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
45 48
46 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData); 49 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData);
47 }; 50 };
48 51
49 } // namespace 52 } // namespace
50 53
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 SharedMemoryDataConsumerHandle::ReaderImpl* 478 SharedMemoryDataConsumerHandle::ReaderImpl*
476 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) { 479 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) {
477 return new ReaderImpl(context_, client); 480 return new ReaderImpl(context_, client);
478 } 481 }
479 482
480 const char* SharedMemoryDataConsumerHandle::debugName() const { 483 const char* SharedMemoryDataConsumerHandle::debugName() const {
481 return "SharedMemoryDataConsumerHandle"; 484 return "SharedMemoryDataConsumerHandle";
482 } 485 }
483 486
484 } // namespace content 487 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698