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

Unified Diff: net/url_request/url_request.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_fetcher_impl_unittest.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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|.
}
« no previous file with comments | « net/url_request/url_fetcher_impl_unittest.cc ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698