Index: net/url_request/url_request.cc |
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
index 7ae48e86d7b224b3dd7052886e09c7924803697a..613d9bb67f02a1b6d6f524672403d284919ad2d0 100644 |
--- a/net/url_request/url_request.cc |
+++ b/net/url_request/url_request.cc |
@@ -13,6 +13,7 @@ |
#include "base/memory/singleton.h" |
#include "base/message_loop/message_loop.h" |
#include "base/metrics/stats_counters.h" |
+#include "base/profiler/scoped_tracker.h" |
#include "base/stl_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/synchronization/lock.h" |
@@ -832,6 +833,11 @@ void URLRequest::NotifyReceivedRedirect(const RedirectInfo& redirect_info, |
RestartWithJob(job); |
} else if (delegate_) { |
OnCallToDelegate(); |
+ |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnReceivedRedirect")); |
delegate_->OnReceivedRedirect(this, redirect_info, defer_redirect); |
// |this| may be have been destroyed here. |
} |
@@ -840,7 +846,14 @@ void URLRequest::NotifyReceivedRedirect(const RedirectInfo& redirect_info, |
void URLRequest::NotifyBeforeNetworkStart(bool* defer) { |
if (delegate_ && !notified_before_network_start_) { |
OnCallToDelegate(); |
- delegate_->OnBeforeNetworkStart(this, defer); |
+ { |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is |
+ // fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnBeforeNetworkStart")); |
+ delegate_->OnBeforeNetworkStart(this, defer); |
+ } |
if (!*defer) |
OnCallToDelegateComplete(); |
notified_before_network_start_ = true; |
@@ -881,6 +894,11 @@ void URLRequest::NotifyResponseStarted() { |
NotifyRequestCompleted(); |
OnCallToDelegate(); |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is |
+ // fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnResponseStarted")); |
delegate_->OnResponseStarted(this); |
// Nothing may appear below this line as OnResponseStarted may delete |
// |this|. |
@@ -1097,8 +1115,14 @@ void URLRequest::NotifyAuthRequiredComplete( |
case NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION: |
// Defer to the URLRequest::Delegate, since the NetworkDelegate |
// didn't take an action. |
- if (delegate_) |
+ if (delegate_) { |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is |
+ // fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnAuthRequired")); |
delegate_->OnAuthRequired(this, auth_info.get()); |
+ } |
break; |
case NetworkDelegate::AUTH_REQUIRED_RESPONSE_SET_AUTH: |
@@ -1117,14 +1141,24 @@ void URLRequest::NotifyAuthRequiredComplete( |
void URLRequest::NotifyCertificateRequested( |
SSLCertRequestInfo* cert_request_info) { |
- if (delegate_) |
+ if (delegate_) { |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnCertificateRequested")); |
delegate_->OnCertificateRequested(this, cert_request_info); |
+ } |
} |
void URLRequest::NotifySSLCertificateError(const SSLInfo& ssl_info, |
bool fatal) { |
- if (delegate_) |
+ if (delegate_) { |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnSSLCertificateError")); |
delegate_->OnSSLCertificateError(this, ssl_info, fatal); |
+ } |
} |
bool URLRequest::CanGetCookies(const CookieList& cookie_list) const { |
@@ -1165,8 +1199,13 @@ void URLRequest::NotifyReadCompleted(int bytes_read) { |
if (bytes_read > 0 && !was_cached()) |
NetworkChangeNotifier::NotifyDataReceived(*this, bytes_read); |
- if (delegate_) |
+ if (delegate_) { |
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedTracker tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 URLRequest::Delegate::OnReadCompleted")); |
delegate_->OnReadCompleted(this, bytes_read); |
+ } |
// Nothing below this line as OnReadCompleted may delete |this|. |
} |