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

Unified Diff: net/url_request/url_fetcher_core.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « net/url_request/sdch_dictionary_fetcher.cc ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.cc
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc
index 23399f3ae710c07e40c96769caa528a976cab491..420e83147b48c09c24c5967edef462a7357cef0d 100644
--- a/net/url_request/url_fetcher_core.cc
+++ b/net/url_request/url_fetcher_core.cc
@@ -436,16 +436,36 @@ void URLFetcherCore::OnReadCompleted(URLRequest* request,
URLRequestThrottlerManager* throttler_manager =
request->context()->throttler_manager();
if (throttler_manager) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted1"));
+
url_throttler_entry_ = throttler_manager->RegisterRequestUrl(url_);
}
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted2"));
+
do {
if (!request_->status().is_success() || bytes_read <= 0)
break;
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted3"));
+
current_response_bytes_ += bytes_read;
InformDelegateDownloadProgress();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile4(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted4"));
+
const int result =
WriteBuffer(new DrainableIOBuffer(buffer_.get(), bytes_read));
if (result < 0) {
@@ -456,17 +476,38 @@ void URLFetcherCore::OnReadCompleted(URLRequest* request,
const URLRequestStatus status = request_->status();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile5(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted5"));
+
if (status.is_success())
request_->GetResponseCookies(&cookies_);
// See comments re: HEAD requests in ReadResponse().
if (!status.is_io_pending() || request_type_ == URLFetcher::HEAD) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile6(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted6"));
+
status_ = status;
ReleaseRequest();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile7(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted7"));
+
// No more data to write.
const int result = response_writer_->Finish(
base::Bind(&URLFetcherCore::DidFinishWriting, this));
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile8(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLFetcherCore::OnReadCompleted8"));
+
if (result != ERR_IO_PENDING)
DidFinishWriting(result);
}
« no previous file with comments | « net/url_request/sdch_dictionary_fetcher.cc ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698