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

Unified Diff: content/child/shared_memory_received_data_factory.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, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/child/shared_memory_received_data_factory.cc
diff --git a/content/child/shared_memory_received_data_factory.cc b/content/child/shared_memory_received_data_factory.cc
index 4bfbb3e495bbdd2be66f912bd7157831da9dea6f..544899d79faf1792b0094e75916af9a5e6116af5 100644
--- a/content/child/shared_memory_received_data_factory.cc
+++ b/content/child/shared_memory_received_data_factory.cc
@@ -20,11 +20,13 @@ class SharedMemoryReceivedDataFactory::SharedMemoryReceivedData final
const char* payload,
int length,
int encoded_length,
+ int encoded_body_length,
scoped_refptr<SharedMemoryReceivedDataFactory> factory,
SharedMemoryReceivedDataFactory::TicketId id)
: payload_(payload),
length_(length),
encoded_length_(encoded_length),
+ encoded_body_length_(encoded_body_length),
factory_(factory),
id_(id) {}
@@ -33,11 +35,13 @@ class SharedMemoryReceivedDataFactory::SharedMemoryReceivedData final
const char* payload() const override { return payload_; }
int length() const override { return length_; }
int encoded_length() const override { return encoded_length_; }
+ int encoded_body_length() const override { return encoded_body_length_; }
private:
const char* const payload_;
const int length_;
const int encoded_length_;
+ const int encoded_body_length_;
scoped_refptr<SharedMemoryReceivedDataFactory> factory_;
SharedMemoryReceivedDataFactory::TicketId id_;
@@ -65,13 +69,14 @@ SharedMemoryReceivedDataFactory::~SharedMemoryReceivedDataFactory() {
std::unique_ptr<RequestPeer::ReceivedData>
SharedMemoryReceivedDataFactory::Create(int offset,
int length,
- int encoded_length) {
+ int encoded_length,
+ int encoded_body_length) {
const char* start = static_cast<char*>(memory_->memory());
const char* payload = start + offset;
TicketId id = id_++;
- return base::WrapUnique(
- new SharedMemoryReceivedData(payload, length, encoded_length, this, id));
+ return base::WrapUnique(new SharedMemoryReceivedData(
+ payload, length, encoded_length, encoded_body_length, this, id));
}
void SharedMemoryReceivedDataFactory::Stop() {

Powered by Google App Engine
This is Rietveld 408576698