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

Unified Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 1105743002: More instrumentation to track down net/ jank. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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/dns/host_resolver_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_script_fetcher_impl.cc
diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc
index 7d5d1ff84551e0fa137407c412370948eaa74ba4..8ef777abe05595d05acf02ef9edec7d600b881fb 100644
--- a/net/proxy/proxy_script_fetcher_impl.cc
+++ b/net/proxy/proxy_script_fetcher_impl.cc
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "net/base/data_url.h"
#include "net/base/io_buffer.h"
@@ -114,6 +115,11 @@ void ProxyScriptFetcherImpl::OnResponseCompleted(URLRequest* request) {
int ProxyScriptFetcherImpl::Fetch(
const GURL& url, base::string16* text, const CompletionCallback& callback) {
+ // TODO(eroman): Remove ScopedTracker below once crbug.com/455942 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "455942 ProxyScriptFetcherImpl::Fetch (Other)"));
+
// It is invalid to call Fetch() while a request is already in progress.
DCHECK(!cur_request_.get());
DCHECK(!callback.is_null());
@@ -121,6 +127,10 @@ int ProxyScriptFetcherImpl::Fetch(
// Handle base-64 encoded data-urls that contain custom PAC scripts.
if (url.SchemeIs("data")) {
+ // TODO(eroman): Remove ScopedTracker below once crbug.com/455942 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "455942 ProxyScriptFetcherImpl::Fetch (data url)"));
std::string mime_type;
std::string charset;
std::string data;
@@ -155,6 +165,12 @@ int ProxyScriptFetcherImpl::Fetch(
// Post a task to timeout this request if it takes too long.
cur_request_id_ = ++next_id_;
+
+ // TODO(eroman): Remove ScopedTracker below once crbug.com/455942 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "455942 ProxyScriptFetcherImpl::Fetch (PostDelayedTask)"));
+
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ProxyScriptFetcherImpl::OnTimeout,
« no previous file with comments | « net/dns/host_resolver_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698