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

Unified Diff: content/child/url_loader_client_impl.cc

Issue 2629513003: Implement CachedMetadata handling on MojoAsyncResourceHandler (Closed)
Patch Set: rebase Created 3 years, 11 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/url_loader_client_impl.cc
diff --git a/content/child/url_loader_client_impl.cc b/content/child/url_loader_client_impl.cc
index 04aee613ace7c63b19db4b3b8c5f995f9cf9ba30..f41f661e079f147b83637d35c9e1851f633bb89f 100644
--- a/content/child/url_loader_client_impl.cc
+++ b/content/child/url_loader_client_impl.cc
@@ -134,6 +134,13 @@ void URLLoaderClientImpl::OnDataDownloaded(int64_t data_len,
Dispatch(ResourceMsg_DataDownloaded(request_id_, data_len, encoded_data_len));
}
+void URLLoaderClientImpl::OnReceiveCachedMetadata(
+ const std::vector<uint8_t>& data) {
+ const char* ptr = reinterpret_cast<const char*>(data.data());
mmenke 2017/01/17 18:39:57 Again, suggest replacing ptr with data
yhirano 2017/01/18 06:22:42 I'm using data_ptr as we are already using the nam
+ Dispatch(ResourceMsg_ReceivedCachedMetadata(
+ request_id_, std::vector<char>(ptr, ptr + data.size())));
dcheng 2017/01/14 11:30:17 And I guess this is another copy =( Is there any
yhirano 2017/01/16 05:25:46 This is needed to reuse the current ResourceDispat
dcheng 2017/01/18 00:23:53 Sort of... we have to reinterpret_cast the origina
yhirano 2017/01/18 06:22:42 Acknowledged.
+}
+
void URLLoaderClientImpl::OnTransferSizeUpdated(int32_t transfer_size_diff) {
if (is_deferred_) {
accumulated_transfer_size_diff_during_deferred_ += transfer_size_diff;

Powered by Google App Engine
This is Rietveld 408576698