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

Unified Diff: net/url_request/url_request_job.cc

Issue 808483004: Instrumenting URLRequestJob::ReadRawDataHelper for jank. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke comment Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.cc
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 2deb0f5adf74dc0a9c13b5147c35a3d2954b7b8c..2be8a74c3c36c950fb76c47d1663b98a8921a674 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -834,6 +834,11 @@ bool URLRequestJob::ReadRawDataHelper(IOBuffer* buf, int buf_size,
bool rv = ReadRawData(buf, buf_size, bytes_read);
if (!request_->status().is_io_pending()) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::ReadRawDataHelper1"));
+
// If the read completes synchronously, either success or failure,
// invoke the OnRawReadComplete callback so we can account for the
// completed read.
@@ -875,8 +880,14 @@ void URLRequestJob::RecordBytesRead(int bytes_read) {
<< " pre total = " << prefilter_bytes_read_
<< " post total = " << postfilter_bytes_read_;
UpdatePacketReadTimes(); // Facilitate stats recording if it is active.
- if (network_delegate_)
+ if (network_delegate_) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::RecordBytesRead NotifyRawBytesRead"));
+
network_delegate_->NotifyRawBytesRead(*request_, bytes_read);
+ }
}
bool URLRequestJob::FilterHasData() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698