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

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: Initialise encoded_body_length for sync XHR to data: URLs 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 19 matching lines...) Expand all
30 task_runner_(base::ThreadTaskRunnerHandle::Get()) {} 30 task_runner_(base::ThreadTaskRunnerHandle::Get()) {}
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_data_length() const override {
41 return data_->encoded_data_length();
42 }
43 int encoded_body_length() const override {
44 return data_->encoded_body_length();
45 }
41 46
42 private: 47 private:
43 std::unique_ptr<RequestPeer::ReceivedData> data_; 48 std::unique_ptr<RequestPeer::ReceivedData> data_;
44 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 49 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
45 50
46 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData); 51 DISALLOW_COPY_AND_ASSIGN(DelegateThreadSafeReceivedData);
47 }; 52 };
48 53
49 } // namespace 54 } // namespace
50 55
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 SharedMemoryDataConsumerHandle::ReaderImpl* 480 SharedMemoryDataConsumerHandle::ReaderImpl*
476 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) { 481 SharedMemoryDataConsumerHandle::obtainReaderInternal(Client* client) {
477 return new ReaderImpl(context_, client); 482 return new ReaderImpl(context_, client);
478 } 483 }
479 484
480 const char* SharedMemoryDataConsumerHandle::debugName() const { 485 const char* SharedMemoryDataConsumerHandle::debugName() const {
481 return "SharedMemoryDataConsumerHandle"; 486 return "SharedMemoryDataConsumerHandle";
482 } 487 }
483 488
484 } // namespace content 489 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher_unittest.cc ('k') | content/child/shared_memory_data_consumer_handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698