File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -577,23 +577,6 @@ char* Pickle::BeginWriteData(int length) {
577
577
return data_ptr;
578
578
}
579
579
580
- void Pickle::TrimWriteData (int new_length) {
581
- DCHECK (variable_buffer_offset_ != 0 );
582
-
583
- // Fetch the the variable buffer size
584
- int * cur_length = reinterpret_cast <int *>(
585
- reinterpret_cast <char *>(header_) + variable_buffer_offset_);
586
-
587
- if (new_length < 0 || new_length > *cur_length) {
588
- NOTREACHED () << " Invalid length in TrimWriteData." ;
589
- return ;
590
- }
591
-
592
- // Update the payload size and variable buffer size
593
- header_->payload_size -= (*cur_length - new_length);
594
- *cur_length = new_length;
595
- }
596
-
597
580
void Pickle::Resize (uint32_t new_capacity) {
598
581
new_capacity = ConstantAligner<kPayloadUnit >::align (new_capacity);
599
582
Original file line number Diff line number Diff line change @@ -176,18 +176,6 @@ class Pickle {
176
176
// The returned pointer will only be valid until the next write operation
177
177
// on this Pickle.
178
178
char * BeginWriteData (int length);
179
-
180
- // For Pickles which contain variable length buffers (e.g. those created
181
- // with BeginWriteData), the Pickle can
182
- // be 'trimmed' if the amount of data required is less than originally
183
- // requested. For example, you may have created a buffer with 10K of data,
184
- // but decided to only fill 10 bytes of that data. Use this function
185
- // to trim the buffer so that we don't send 9990 bytes of unused data.
186
- // You cannot increase the size of the variable buffer; only shrink it.
187
- // This function assumes that the length of the variable buffer has
188
- // not been changed.
189
- void TrimWriteData (int length);
190
-
191
179
void EndRead (void * iter) const {
192
180
DCHECK (iter == end_of_payload ());
193
181
}
You can’t perform that action at this time.
0 commit comments