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

Unified Diff: net/url_request/url_request_job.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/url_request_http_job_unittest.cc ('k') | net/websockets/websocket_basic_handshake_stream.h » ('j') | 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 16f7b711478f5d8917ff0da423cb705ca69ae6c0..36101953c6c6c2966cbb29d83b80231d79200868 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -326,19 +326,45 @@ void URLRequestJob::NotifyHeadersComplete() {
// survival until we can get out of this method.
scoped_refptr<URLRequestJob> self_preservation(this);
- if (request_)
+ if (request_) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 1"));
+
request_->OnHeadersComplete();
+ }
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 2"));
GURL new_location;
int http_status_code;
if (IsRedirectResponse(&new_location, &http_status_code)) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 3"));
+
// Redirect response bodies are not read. Notify the transaction
// so it does not treat being stopped as an error.
DoneReadingRedirectResponse();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile4(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 4"));
+
RedirectInfo redirect_info =
ComputeRedirectInfo(new_location, http_status_code);
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile5(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 5"));
+
bool defer_redirect = false;
request_->NotifyReceivedRedirect(redirect_info, &defer_redirect);
@@ -347,6 +373,11 @@ void URLRequestJob::NotifyHeadersComplete() {
if (!request_ || !request_->has_delegate())
return;
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile6(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 6"));
+
// If we were not cancelled, then maybe follow the redirect.
if (request_->status().is_success()) {
if (defer_redirect) {
@@ -357,8 +388,19 @@ void URLRequestJob::NotifyHeadersComplete() {
return;
}
} else if (NeedsAuth()) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile7(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 7"));
+
scoped_refptr<AuthChallengeInfo> auth_info;
GetAuthChallengeInfo(&auth_info);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile8(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 8"));
+
// Need to check for a NULL auth_info because the server may have failed
// to send a challenge with the 401 response.
if (auth_info.get()) {
@@ -368,6 +410,11 @@ void URLRequestJob::NotifyHeadersComplete() {
}
}
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile9(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 9"));
+
has_handled_response_ = true;
if (request_->status().is_success())
filter_.reset(SetupFilter());
@@ -379,6 +426,11 @@ void URLRequestJob::NotifyHeadersComplete() {
base::StringToInt64(content_length, &expected_content_size_);
}
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
+ tracked_objects::ScopedTracker tracking_profile10(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "423948 URLRequestJob::NotifyHeadersComplete 10"));
+
request_->NotifyResponseStarted();
}
« no previous file with comments | « net/url_request/url_request_http_job_unittest.cc ('k') | net/websockets/websocket_basic_handshake_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698