DescriptionAvoid a string copy in URLRequestResourceBundleJob::GetData().
This adds a URLRequestSimpleJob::GetStringPieceData method with which a subclass
can provide its own storage for the result string, instead of having to copy the
whole thing into the URLRequestSimpleJob.
I also made base::IsStringUTF8 take a StringPiece to avoid a copy there.
BUG=422489
Committed: https://crrev.com/3edf2fec6af00f9a3928edf5b67e77464c47819a
Cr-Commit-Position: refs/heads/master@{#304445}
Patch Set 1 #Patch Set 2 : Fix streaming_utf8_validator_perftest.cc for IsStringUTF8(StringPiece). #
Total comments: 2
Patch Set 3 : Switch to RefCountedMemory. #
Total comments: 8
Patch Set 4 : Fix mmenke's comments: LoadDataResourceBytes() and better comments. #Patch Set 5 : Fix spelling of GetRefcountedData #
Total comments: 4
Patch Set 6 : Tidy up #
Messages
Total messages: 16 (3 generated)
|