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

Unified Diff: content/child/url_loader_client_impl.cc

Issue 2814273006: Remove an unnecessary CachedMetadata copy in URLLoaderClientImpl (Closed)
Patch Set: fix Created 3 years, 8 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
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/url_loader_client_impl.cc
diff --git a/content/child/url_loader_client_impl.cc b/content/child/url_loader_client_impl.cc
index 2876d5daec09cc888c15920429ab42475ca34b98..bd4ef4316e66d80dea57cd979a45fbe9f23fc7c4 100644
--- a/content/child/url_loader_client_impl.cc
+++ b/content/child/url_loader_client_impl.cc
@@ -146,13 +146,10 @@ void URLLoaderClientImpl::OnDataDownloaded(int64_t data_len,
void URLLoaderClientImpl::OnReceiveCachedMetadata(
const std::vector<uint8_t>& data) {
- const uint8_t* data_ptr = reinterpret_cast<const uint8_t*>(data.data());
- std::vector<char> data_to_pass(data_ptr, data_ptr + data.size());
if (NeedsStoringMessage()) {
- StoreAndDispatch(
- ResourceMsg_ReceivedCachedMetadata(request_id_, data_to_pass));
+ StoreAndDispatch(ResourceMsg_ReceivedCachedMetadata(request_id_, data));
} else {
- resource_dispatcher_->OnReceivedCachedMetadata(request_id_, data_to_pass);
+ resource_dispatcher_->OnReceivedCachedMetadata(request_id_, data);
}
}
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698