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

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: 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 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..beaa48f7e32e94b1bd8c8e2fa2df9922d17da36e 100644
--- a/content/child/shared_memory_received_data_factory.cc
+++ b/content/child/shared_memory_received_data_factory.cc
@@ -19,12 +19,14 @@ class SharedMemoryReceivedDataFactory::SharedMemoryReceivedData final
SharedMemoryReceivedData(
const char* payload,
int length,
- int encoded_length,
+ int encoded_data_length,
+ int encoded_body_length,
scoped_refptr<SharedMemoryReceivedDataFactory> factory,
SharedMemoryReceivedDataFactory::TicketId id)
: payload_(payload),
length_(length),
- encoded_length_(encoded_length),
+ encoded_data_length_(encoded_data_length),
+ encoded_body_length_(encoded_body_length),
factory_(factory),
id_(id) {}
@@ -32,12 +34,14 @@ 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_data_length() const override { return encoded_data_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_data_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_data_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_data_length, encoded_body_length, this, id));
}
void SharedMemoryReceivedDataFactory::Stop() {
« no previous file with comments | « content/child/shared_memory_received_data_factory.h ('k') | content/child/shared_memory_received_data_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698