Commit 3e5bced6 authored by michaeln's avatar michaeln Committed by Commit bot

ScopedTrackers to help pin down where IOThread::InitSystemRequestContextOnIOThread is janky.

TBR=pkasting
BUG=454983

Review URL: https://codereview.chromium.org/886933010

Cr-Commit-Position: refs/heads/master@{#315423}
parent a8b2e623
......@@ -17,6 +17,7 @@
#include "base/metrics/user_metrics.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
......@@ -253,6 +254,10 @@ ConstructProxyScriptFetcherContext(IOThread::Globals* globals,
net::URLRequestContext*
ConstructSystemRequestContext(IOThread::Globals* globals,
net::NetLog* net_log) {
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 ConstructSystemRequestContext"));
net::URLRequestContext* context = new SystemURLRequestContext;
context->set_net_log(net_log);
context->set_host_resolver(globals->host_resolver.get());
......@@ -982,6 +987,10 @@ void IOThread::ClearHostCache() {
void IOThread::InitializeNetworkSessionParams(
net::HttpNetworkSession::Params* params) {
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 IOThread::InitializeNetworkSessionParams"));
InitializeNetworkSessionParamsFromGlobals(*globals_, params);
}
......@@ -1111,9 +1120,16 @@ void IOThread::InitSystemRequestContextOnIOThread() {
system_params.net_log = net_log_;
system_params.proxy_service = globals_->system_proxy_service.get();
globals_->system_http_transaction_factory.reset(
new net::HttpNetworkLayer(
new net::HttpNetworkSession(system_params)));
{
// TODO(michaeln): Remove after crbug.com/454983 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 IOThread::InitSystemRequestContextOnIOThread"
".HttpNetworkSession"));
globals_->system_http_transaction_factory.reset(
new net::HttpNetworkLayer(
new net::HttpNetworkSession(system_params)));
}
globals_->system_url_request_job_factory.reset(
new net::URLRequestJobFactoryImpl());
globals_->system_request_context.reset(
......
......@@ -5,6 +5,7 @@
#include "chrome/browser/net/proxy_service_factory.h"
#include "base/command_line.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread.h"
#include "chrome/browser/browser_process.h"
......@@ -94,6 +95,11 @@ net::ProxyService* ProxyServiceFactory::CreateProxyService(
bool quick_check_enabled) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 ProxyServiceFactory::CreateProxyService"));
#if defined(OS_IOS)
bool use_v8 = false;
#else
......
......@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/debug/stack_trace.h"
#include "base/logging.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/values.h"
......@@ -35,6 +36,10 @@ namespace {
net::ClientSocketPoolManager* CreateSocketPoolManager(
net::HttpNetworkSession::SocketPoolType pool_type,
const net::HttpNetworkSession::Params& params) {
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 CreateSocketPoolManager"));
// TODO(yutak): Differentiate WebSocket pool manager and allow more
// simultaneous connections for WebSockets.
return new net::ClientSocketPoolManagerImpl(
......@@ -156,6 +161,10 @@ HttpNetworkSession::HttpNetworkSession(const Params& params)
DCHECK(proxy_service_);
DCHECK(ssl_config_service_.get());
CHECK(http_server_properties_);
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 HttpNetworkSession::HttpNetworkSession"));
for (int i = ALTERNATE_PROTOCOL_MINIMUM_VALID_VERSION;
i <= ALTERNATE_PROTOCOL_MAXIMUM_VALID_VERSION; ++i) {
......
......@@ -622,6 +622,10 @@ QuicStreamFactory::QuicStreamFactory(
task_runner_(nullptr),
weak_factory_(this) {
DCHECK(transport_security_state_);
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 QuicStreamFactory::QuicStreamFactory"));
crypto_config_.set_user_agent_id(user_agent_id);
crypto_config_.AddCanonicalSuffix(".c.youtube.com");
crypto_config_.AddCanonicalSuffix(".googlevideo.com");
......
......@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/values.h"
#include "net/base/address_list.h"
#include "net/http/http_network_session.h"
......@@ -64,6 +65,10 @@ SpdySessionPool::SpdySessionPool(
HostPortPair::FromString(trusted_spdy_proxy)) {
DCHECK(default_protocol_ >= kProtoSPDYMinimumVersion &&
default_protocol_ <= kProtoSPDYMaximumVersion);
// TODO(michaeln): Remove ScopedTracker below once crbug.com/454983 is fixed
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"454983 SpdySessionPool::SpdySessionPool"));
NetworkChangeNotifier::AddIPAddressObserver(this);
if (ssl_config_service_.get())
ssl_config_service_->AddObserver(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment