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

Unified Diff: content/child/shared_memory_received_data_factory.cc

Issue 2540023003: Dispatch encoded_data_length separately in content/child (Closed)
Patch Set: fix Created 4 years 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 0fb59eaeef49ec74f3443077870a6a9dab9a5430..d66a471b27085ad299e7257ccfa7f3c3609c4508 100644
--- a/content/child/shared_memory_received_data_factory.cc
+++ b/content/child/shared_memory_received_data_factory.cc
@@ -19,12 +19,10 @@ class SharedMemoryReceivedDataFactory::SharedMemoryReceivedData final
SharedMemoryReceivedData(
const char* payload,
int length,
- int encoded_data_length,
scoped_refptr<SharedMemoryReceivedDataFactory> factory,
SharedMemoryReceivedDataFactory::TicketId id)
: payload_(payload),
length_(length),
- encoded_data_length_(encoded_data_length),
factory_(factory),
id_(id) {}
@@ -32,12 +30,10 @@ class SharedMemoryReceivedDataFactory::SharedMemoryReceivedData final
const char* payload() const override { return payload_; }
int length() const override { return length_; }
- int encoded_data_length() const override { return encoded_data_length_; }
private:
const char* const payload_;
const int length_;
- const int encoded_data_length_;
scoped_refptr<SharedMemoryReceivedDataFactory> factory_;
SharedMemoryReceivedDataFactory::TicketId id_;
@@ -63,15 +59,12 @@ SharedMemoryReceivedDataFactory::~SharedMemoryReceivedDataFactory() {
}
std::unique_ptr<RequestPeer::ReceivedData>
-SharedMemoryReceivedDataFactory::Create(int offset,
- int length,
- int encoded_data_length) {
+SharedMemoryReceivedDataFactory::Create(int offset, int length) {
const char* start = static_cast<char*>(memory_->memory());
const char* payload = start + offset;
TicketId id = id_++;
- return base::MakeUnique<SharedMemoryReceivedData>(
- payload, length, encoded_data_length, this, id);
+ return base::MakeUnique<SharedMemoryReceivedData>(payload, length, this, id);
}
void SharedMemoryReceivedDataFactory::Stop() {

Powered by Google App Engine
This is Rietveld 408576698