Commit 68b2894c authored by Giovanni Ortuño Urquidi's avatar Giovanni Ortuño Urquidi Committed by Commit Bot

Reland "Simplify in-process URLRequestContext creation with the NetworkService."

This reverts commit d6870941.

Reason for revert: The original CL wasn't the cause of the mac bots
failing.

Original change's description:
> Revert "Simplify in-process URLRequestContext creation with the NetworkService."
> 
> This reverts commit f34bba7c.
> 
> Reason for revert: A lot of tests are failing on Mac10.10 and Mac10.12.
> Looking at both blame[1][2] lists when the tests started failing, this
> seems like the most likely culprit.
> 
> [1] https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.10%20Tests/33158
> [2] https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac10.12%20Tests/13801
> 
> Original change's description:
> > Simplify in-process URLRequestContext creation with the NetworkService.
> >
> > The old code hooked up things to the URLRequestContext that hadn't been
> > ported over to work with the NetworkService yet, when the NetworkService
> > was enabled. This CL just does the minimum setup that's needed to not
> > crash. It also makes requests made with the in-process URLRequestContext
> > fail when the network service is enabled. These changes will help
> > identify code that still depends on the legacy path, and allow for some
> > cleanup of URLRequestContextBuilderMojo and NetworkContext.
> >
> > Cq-Include-Trybots: luci.chromium.try:linux_mojo
> > Change-Id: I4c3f40e6dc3c235844846bff7d1d43d0b1c986d0
> > Bug: 825242
> > Reviewed-on: https://chromium-review.googlesource.com/1096075
> > Commit-Queue: Matt Menke <mmenke@chromium.org>
> > Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#567879}
> 
> TBR=jam@chromium.org,mmenke@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 825242
> Change-Id: I36da9fb06fa89296e031c88d7c75c16e63f3b725
> Cq-Include-Trybots: luci.chromium.try:linux_mojo
> Reviewed-on: https://chromium-review.googlesource.com/1103818
> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
> Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#567932}

TBR=jam@chromium.org,mmenke@chromium.org,ortuno@chromium.org

Change-Id: I4f379142535672553027802c10d0a678a5734aad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 825242
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Reviewed-on: https://chromium-review.googlesource.com/1103858Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567948}
parent a83801ab
......@@ -784,6 +784,8 @@ jumbo_split_static_library("browser") {
"net/dns_probe_runner.h",
"net/dns_probe_service.cc",
"net/dns_probe_service.h",
"net/failing_url_request_interceptor.cc",
"net/failing_url_request_interceptor.h",
"net/file_downloader.cc",
"net/file_downloader.h",
"net/net_error_diagnostics_dialog.h",
......
......@@ -36,6 +36,7 @@
#include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/dns_probe_service.h"
#include "chrome/browser/net/failing_url_request_interceptor.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_features.h"
......@@ -457,10 +458,33 @@ void IOThread::SetUpProxyService(
}
void IOThread::ConstructSystemRequestContext() {
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
globals_->deprecated_network_quality_estimator =
std::make_unique<net::NetworkQualityEstimator>(
std::make_unique<net::NetworkQualityEstimatorParams>(
std::map<std::string, std::string>()),
net_log_);
net::URLRequestContextBuilder builder;
std::vector<std::unique_ptr<net::URLRequestInterceptor>>
url_request_interceptors;
url_request_interceptors.emplace_back(
std::make_unique<FailingURLRequestInterceptor>());
builder.SetInterceptors(std::move(url_request_interceptors));
builder.set_network_quality_estimator(
globals_->deprecated_network_quality_estimator.get());
builder.SetCertVerifier(
std::make_unique<WrappedCertVerifierForIOThreadTesting>());
builder.set_proxy_resolution_service(
net::ProxyResolutionService::CreateDirect());
globals_->system_request_context_owner =
network::URLRequestContextOwner(nullptr, builder.Build());
globals_->system_request_context =
globals_->system_request_context_owner.url_request_context.get();
network_context_params_.reset();
} else {
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();
if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
auto chrome_network_delegate = std::make_unique<ChromeNetworkDelegate>(
extension_event_router_forwarder(), &system_enable_referrers_);
// By default, data usage is considered off the record.
......@@ -470,56 +494,39 @@ void IOThread::ConstructSystemRequestContext() {
builder->set_network_delegate(
globals_->data_use_ascriber->CreateNetworkDelegate(
std::move(chrome_network_delegate), GetMetricsDataUseForwarder()));
}
std::unique_ptr<net::HostResolver> host_resolver(
CreateGlobalHostResolver(net_log_));
std::unique_ptr<net::CertVerifier> cert_verifier;
if (g_cert_verifier_for_io_thread_testing) {
cert_verifier = std::make_unique<WrappedCertVerifierForIOThreadTesting>();
} else {
std::unique_ptr<net::CertVerifier> cert_verifier;
if (g_cert_verifier_for_io_thread_testing) {
cert_verifier = std::make_unique<WrappedCertVerifierForIOThreadTesting>();
} else {
#if defined(OS_CHROMEOS)
// Creates a CertVerifyProc that doesn't allow any profile-provided certs.
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
base::MakeRefCounted<chromeos::CertVerifyProcChromeOS>()));
// Creates a CertVerifyProc that doesn't allow any profile-provided certs.
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
base::MakeRefCounted<chromeos::CertVerifyProcChromeOS>()));
#else
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
#endif
}
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
builder->SetCertVerifier(
network::IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
command_line, switches::kUserDataDir, std::move(cert_verifier)));
UMA_HISTOGRAM_BOOLEAN(
"Net.Certificate.IgnoreCertificateErrorsSPKIListPresent",
command_line.HasSwitch(
network::switches::kIgnoreCertificateErrorsSPKIList));
SetUpProxyService(builder.get());
}
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
builder->SetCertVerifier(
network::IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
command_line, switches::kUserDataDir, std::move(cert_verifier)));
UMA_HISTOGRAM_BOOLEAN(
"Net.Certificate.IgnoreCertificateErrorsSPKIListPresent",
command_line.HasSwitch(
network::switches::kIgnoreCertificateErrorsSPKIList));
SetUpProxyService(builder.get());
if (!is_quic_allowed_on_init_)
globals_->quic_disabled = true;
if (!is_quic_allowed_on_init_)
globals_->quic_disabled = true;
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
globals_->deprecated_network_quality_estimator =
std::make_unique<net::NetworkQualityEstimator>(
std::make_unique<net::NetworkQualityEstimatorParams>(
std::map<std::string, std::string>()),
net_log_);
globals_->deprecated_host_resolver = std::move(host_resolver);
globals_->system_request_context_owner = std::move(builder)->Create(
std::move(network_context_params_).get(), !is_quic_allowed_on_init_,
net_log_, globals_->deprecated_host_resolver.get(),
globals_->deprecated_network_quality_estimator.get());
globals_->system_request_context =
globals_->system_request_context_owner.url_request_context.get();
} else {
network::NetworkService* network_service = content::GetNetworkServiceImpl();
network_service->SetHostResolver(std::move(host_resolver));
network_service->SetHostResolver(CreateGlobalHostResolver(net_log_));
// These must be done after the SetHostResolver call.
network_service->SetUpHttpAuth(std::move(http_auth_static_params_));
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/net/failing_url_request_interceptor.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request_error_job.h"
FailingURLRequestInterceptor::FailingURLRequestInterceptor() {}
FailingURLRequestInterceptor::~FailingURLRequestInterceptor() {}
net::URLRequestJob* FailingURLRequestInterceptor::MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const {
return new net::URLRequestErrorJob(request, network_delegate,
net::ERR_NOT_IMPLEMENTED);
}
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_NET_FAILING_URL_REQUEST_INTERCEPTOR_H_
#define CHROME_BROWSER_NET_FAILING_URL_REQUEST_INTERCEPTOR_H_
#include "net/url_request/url_request_interceptor.h"
// A URLRequestInterceptor that fails all network requests.
class FailingURLRequestInterceptor : public net::URLRequestInterceptor {
public:
FailingURLRequestInterceptor();
~FailingURLRequestInterceptor() override;
net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const override;
private:
DISALLOW_COPY_AND_ASSIGN(FailingURLRequestInterceptor);
};
#endif // CHROME_BROWSER_NET_FAILING_URL_REQUEST_INTERCEPTOR_H_
......@@ -34,6 +34,7 @@
#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/chrome_url_request_context_getter.h"
#include "chrome/browser/net/failing_url_request_interceptor.h"
#include "chrome/browser/net/profile_network_context_service.h"
#include "chrome/browser/net/profile_network_context_service_factory.h"
#include "chrome/browser/policy/cloud/policy_header_service_factory.h"
......@@ -528,7 +529,8 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
network_prediction_options_.MoveToThread(io_task_runner);
#if defined(OS_CHROMEOS)
if (!g_cert_verifier_for_profile_io_data_testing) {
if (!g_cert_verifier_for_profile_io_data_testing &&
!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
profile_params_->policy_cert_verifier =
policy::PolicyCertServiceFactory::CreateForProfile(profile);
}
......@@ -1032,57 +1034,6 @@ void ProfileIOData::Init(
extensions_request_context_.reset(new net::URLRequestContext());
extensions_request_context_->set_name("extensions");
// Create the main request context.
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();
ChromeNetworkDelegate* chrome_network_delegate_unowned = nullptr;
if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate(
new ChromeNetworkDelegate(
#if BUILDFLAG(ENABLE_EXTENSIONS)
io_thread_globals->extension_event_router_forwarder.get(),
#else
NULL,
#endif
&enable_referrers_));
#if BUILDFLAG(ENABLE_EXTENSIONS)
chrome_network_delegate->set_extension_info_map(
profile_params_->extension_info_map.get());
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableExtensionsHttpThrottling)) {
extension_throttle_manager_.reset(
new extensions::ExtensionThrottleManager());
}
#endif
chrome_network_delegate->set_profile(profile_params_->profile);
chrome_network_delegate->set_profile_path(profile_params_->path);
chrome_network_delegate->set_cookie_settings(
profile_params_->cookie_settings.get());
chrome_network_delegate->set_force_google_safe_search(
&force_google_safesearch_);
chrome_network_delegate->set_force_youtube_restrict(
&force_youtube_restrict_);
chrome_network_delegate->set_allowed_domains_for_apps(
&allowed_domains_for_apps_);
chrome_network_delegate->set_data_use_aggregator(
io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
chrome_network_delegate_unowned = chrome_network_delegate.get();
std::unique_ptr<net::NetworkDelegate> network_delegate =
ConfigureNetworkDelegate(profile_params_->io_thread,
std::move(chrome_network_delegate));
builder->set_network_delegate(std::move(network_delegate));
}
builder->set_shared_http_auth_handler_factory(
io_thread_globals->system_request_context->http_auth_handler_factory());
io_thread->SetUpProxyService(builder.get());
// Take ownership over these parameters.
cookie_settings_ = profile_params_->cookie_settings;
host_content_settings_map_ = profile_params_->host_content_settings_map;
......@@ -1106,101 +1057,163 @@ void ProfileIOData::Init(
certificate_provider_ = std::move(profile_params_->certificate_provider);
#endif
if (g_cert_verifier_for_profile_io_data_testing) {
builder->SetCertVerifier(
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
net::URLRequestContextBuilder builder;
std::vector<std::unique_ptr<net::URLRequestInterceptor>>
url_request_interceptors;
url_request_interceptors.emplace_back(
std::make_unique<FailingURLRequestInterceptor>());
builder.SetInterceptors(std::move(url_request_interceptors));
builder.set_network_quality_estimator(
io_thread_globals->deprecated_network_quality_estimator.get());
builder.set_proxy_resolution_service(
net::ProxyResolutionService::CreateDirect());
builder.SetCertVerifier(
std::make_unique<WrappedCertVerifierForProfileIODataTesting>());
main_request_context_owner_ =
network::URLRequestContextOwner(nullptr, builder.Build());
main_request_context_ =
main_request_context_owner_.url_request_context.get();
} else {
std::unique_ptr<net::CertVerifier> cert_verifier;
#if defined(OS_CHROMEOS)
crypto::ScopedPK11Slot public_slot =
crypto::GetPublicSlotForChromeOSUser(username_hash_);
// The private slot won't be ready by this point. It shouldn't be necessary
// for cert trust purposes anyway.
scoped_refptr<net::CertVerifyProc> verify_proc(
new chromeos::CertVerifyProcChromeOS(std::move(public_slot)));
if (profile_params_->policy_cert_verifier) {
profile_params_->policy_cert_verifier->InitializeOnIOThread(verify_proc);
cert_verifier = std::move(profile_params_->policy_cert_verifier);
} else {
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(verify_proc.get()));
// Create the main request context.
std::unique_ptr<network::URLRequestContextBuilderMojo> builder =
std::make_unique<network::URLRequestContextBuilderMojo>();
ChromeNetworkDelegate* chrome_network_delegate_unowned = nullptr;
if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
std::unique_ptr<ChromeNetworkDelegate> chrome_network_delegate(
new ChromeNetworkDelegate(
#if BUILDFLAG(ENABLE_EXTENSIONS)
io_thread_globals->extension_event_router_forwarder.get(),
#else
NULL,
#endif
&enable_referrers_));
#if BUILDFLAG(ENABLE_EXTENSIONS)
chrome_network_delegate->set_extension_info_map(
profile_params_->extension_info_map.get());
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableExtensionsHttpThrottling)) {
extension_throttle_manager_.reset(
new extensions::ExtensionThrottleManager());
}
#endif
chrome_network_delegate->set_profile(profile_params_->profile);
chrome_network_delegate->set_profile_path(profile_params_->path);
chrome_network_delegate->set_cookie_settings(
profile_params_->cookie_settings.get());
chrome_network_delegate->set_force_google_safe_search(
&force_google_safesearch_);
chrome_network_delegate->set_force_youtube_restrict(
&force_youtube_restrict_);
chrome_network_delegate->set_allowed_domains_for_apps(
&allowed_domains_for_apps_);
chrome_network_delegate->set_data_use_aggregator(
io_thread_globals->data_use_aggregator.get(), IsOffTheRecord());
chrome_network_delegate_unowned = chrome_network_delegate.get();
std::unique_ptr<net::NetworkDelegate> network_delegate =
ConfigureNetworkDelegate(profile_params_->io_thread,
std::move(chrome_network_delegate));
builder->set_network_delegate(std::move(network_delegate));
}
builder->set_shared_http_auth_handler_factory(
io_thread_globals->system_request_context->http_auth_handler_factory());
io_thread->SetUpProxyService(builder.get());
if (g_cert_verifier_for_profile_io_data_testing) {
builder->SetCertVerifier(
std::make_unique<WrappedCertVerifierForProfileIODataTesting>());
} else {
std::unique_ptr<net::CertVerifier> cert_verifier;
#if defined(OS_CHROMEOS)
crypto::ScopedPK11Slot public_slot =
crypto::GetPublicSlotForChromeOSUser(username_hash_);
// The private slot won't be ready by this point. It shouldn't be
// necessary for cert trust purposes anyway.
scoped_refptr<net::CertVerifyProc> verify_proc(
new chromeos::CertVerifyProcChromeOS(std::move(public_slot)));
if (profile_params_->policy_cert_verifier) {
profile_params_->policy_cert_verifier->InitializeOnIOThread(
verify_proc);
cert_verifier = std::move(profile_params_->policy_cert_verifier);
} else {
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
verify_proc.get()));
}
#elif defined(OS_LINUX) || defined(OS_MACOSX)
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<TrialComparisonCertVerifier>(
profile_params_->profile, net::CertVerifyProc::CreateDefault(),
net::CreateCertVerifyProcBuiltin()));
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<TrialComparisonCertVerifier>(
profile_params_->profile, net::CertVerifyProc::CreateDefault(),
net::CreateCertVerifyProcBuiltin()));
#else
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
net::CertVerifyProc::CreateDefault()));
#endif
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
cert_verifier = network::IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
command_line, switches::kUserDataDir, std::move(cert_verifier));
builder->SetCertVerifier(std::move(cert_verifier));
}
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
cert_verifier = network::IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
command_line, switches::kUserDataDir, std::move(cert_verifier));
builder->SetCertVerifier(std::move(cert_verifier));
}
// Install the New Tab Page Interceptor.
if (profile_params_->new_tab_page_interceptor.get()) {
request_interceptors.push_back(
std::move(profile_params_->new_tab_page_interceptor));
}
// Install the New Tab Page Interceptor.
if (profile_params_->new_tab_page_interceptor.get()) {
request_interceptors.push_back(
std::move(profile_params_->new_tab_page_interceptor));
}
if (data_reduction_proxy_io_data_.get()) {
builder->set_shared_proxy_delegate(
data_reduction_proxy_io_data_->proxy_delegate());
}
if (data_reduction_proxy_io_data_.get()) {
builder->set_shared_proxy_delegate(
data_reduction_proxy_io_data_->proxy_delegate());
}
InitializeInternal(builder.get(), profile_params_.get(), protocol_handlers,
std::move(request_interceptors));
InitializeInternal(builder.get(), profile_params_.get(), protocol_handlers,
std::move(request_interceptors));
builder->SetCreateHttpTransactionFactoryCallback(
base::BindOnce(&content::CreateDevToolsNetworkTransactionFactory));
builder->SetCreateHttpTransactionFactoryCallback(
base::BindOnce(&content::CreateDevToolsNetworkTransactionFactory));
if (base::FeatureList::IsEnabled(network::features::kNetworkService)) {
main_request_context_owner_ = std::move(builder)->Create(
std::move(profile_params_->main_network_context_params).get(),
io_thread_globals->quic_disabled, io_thread->net_log(),
io_thread_globals->deprecated_host_resolver.get(),
io_thread_globals->deprecated_network_quality_estimator.get());
main_request_context_ =
main_request_context_owner_.url_request_context.get();
} else {
main_network_context_ =
content::GetNetworkServiceImpl()->CreateNetworkContextWithBuilder(
std::move(profile_params_->main_network_context_request),
std::move(profile_params_->main_network_context_params),
std::move(builder), &main_request_context_);
}
if (!base::FeatureList::IsEnabled(network::features::kNetworkService) &&
chrome_network_delegate_unowned->domain_reliability_monitor()) {
// Save a pointer to shut down Domain Reliability cleanly before the
// URLRequestContext is dismantled.
domain_reliability_monitor_unowned_ =
chrome_network_delegate_unowned->domain_reliability_monitor();
domain_reliability_monitor_unowned_->InitURLRequestContext(
main_request_context_);
domain_reliability_monitor_unowned_->AddBakedInConfigs();
domain_reliability_monitor_unowned_->SetDiscardUploads(
!GetMetricsEnabledStateOnIOThread());
}
if (!base::FeatureList::IsEnabled(network::features::kNetworkService) &&
chrome_network_delegate_unowned->domain_reliability_monitor()) {
// Save a pointer to shut down Domain Reliability cleanly before the
// URLRequestContext is dismantled.
domain_reliability_monitor_unowned_ =
chrome_network_delegate_unowned->domain_reliability_monitor();
domain_reliability_monitor_unowned_->InitURLRequestContext(
main_request_context_);
domain_reliability_monitor_unowned_->AddBakedInConfigs();
domain_reliability_monitor_unowned_->SetDiscardUploads(
!GetMetricsEnabledStateOnIOThread());
}
// Attach some things to the URLRequestContextBuilder's
// TransportSecurityState. Since no requests have been made yet, safe to do
// this even after the call to Build().
// Attach some things to the URLRequestContextBuilder's
// TransportSecurityState. Since no requests have been made yet, safe to do
// this even after the call to Build().
expect_ct_reporter_.reset(new ChromeExpectCTReporter(
main_request_context_, base::Closure(), base::Closure()));
main_request_context_->transport_security_state()->SetExpectCTReporter(
expect_ct_reporter_.get());
expect_ct_reporter_.reset(new ChromeExpectCTReporter(
main_request_context_, base::Closure(), base::Closure()));
main_request_context_->transport_security_state()->SetExpectCTReporter(
expect_ct_reporter_.get());
resource_context_->host_resolver_ =
io_thread_globals->system_request_context->host_resolver();
resource_context_->request_context_ = main_request_context_;
resource_context_->host_resolver_ =
io_thread_globals->system_request_context->host_resolver();
resource_context_->request_context_ = main_request_context_;
}
OnMainRequestContextCreated(profile_params_.get());
......
......@@ -6,25 +6,208 @@
# See https://crbug.com/769401
# Uncategorized timeouts or test failures.
-CloudPolicyManagerTest.Register
-CloudPolicyManagerTest.RegisterFailsWithRetries
-CloudPolicyManagerTest.RegisterWithRetry
-CloudPolicyTest.FetchPolicy
-CloudPolicyTest.InvalidatePolicy
-ComponentCloudPolicyTest.FetchExtensionPolicy
-ComponentCloudPolicyTest.InstallNewExtension
-ComponentCloudPolicyTest.SignOutAndBackIn
-ComponentCloudPolicyTest.UpdateExtensionPolicy
-ComponentUpdaterPolicyTest.EnabledComponentUpdates
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.ApiAuthCodeFetch/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.ApiAuthCodeFetch/1
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.AppInstallReport/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.AppInstallReport/1
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.AutoEnrollment/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.AutoEnrollment/1
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.PolicyFetch/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.PolicyFetch/1
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.Registration/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.Registration/1
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.Unregistration/0
-DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.Unregistration/1
-DisabledSignInIsolationBrowserTest.SyntheticTrial
-DomainReliabilityBrowserTest.Upload
-EnabledSignInIsolationBrowserTest.SyntheticTrial
-ExtensionDisabledGlobalErrorTest.HigherPermissionsFromSync
-ExtensionDisabledGlobalErrorTest.RemoteInstall
-ExtensionManagementTest.AutoUpdate
-ExtensionManagementTest.AutoUpdateDisabledExtensions
-ExtensionManagementTest.ExternalPolicyRefresh
-ExtensionManagementTest.ExternalUrlUpdate
-ExtensionManagementTest.PolicyOverridesUserInstall
-ExtensionStorageMonitorTest.HostedAppTemporaryFilesystem
-ExtensionUnloadBrowserTest.UnloadWithContentScripts
-ImageFetcherImplBrowserTest.MultipleFetch
-ImageFetcherImplBrowserTest.NormalFetch
-KeyRotationComponentCloudPolicyTest.Basic
-MachineLevelUserCloudPolicyEnrollmentTest.Test/2
-MachineLevelUserCloudPolicyEnrollmentTest.Test/3
-MachineLevelUserCloudPolicyServiceIntegrationTestInstance/MachineLevelUserCloudPolicyServiceIntegrationTest.ChromeDesktopReport/0
-MachineLevelUserCloudPolicyServiceIntegrationTestInstance/MachineLevelUserCloudPolicyServiceIntegrationTest.Registration/0
-ManifestVerifierBrowserTest.BobPayHandlerCanUseMethodThatSupportsAllOrigins
-ManifestVerifierBrowserTest.Handler404CanUseMethodThatSupportsAllOrigins
-ManifestVerifierBrowserTest.OneSupportedOrigin
-ManifestVerifierBrowserTest.ThreeTypesOfMethods
-MediaGalleriesPlatformAppBrowserTest.GetMetadata
-NetworkTimePolicyTest.NetworkTimeQueriesDisabled/0
-NetworkTimePolicyTest.NetworkTimeQueriesDisabled/1
-NewlibPackagedAppTest.SuccessfulLoad
-OutOfProcessPPAPITest.HostResolver
-OutOfProcessPPAPITest.HostResolverPrivate_Resolve
-OutOfProcessPPAPITest.HostResolverPrivate_ResolveIPv4
-OutOfProcessPPAPITest.TCPServerSocketPrivate
-OutOfProcessPPAPITest.TCPSocket
-OutOfProcessPPAPITest.TCPSocketPrivate
-OutOfProcessPPAPITest.TCPSocketPrivateTrusted
-OutOfProcessPPAPITest.UDPSocket_Broadcast
-OutOfProcessPPAPITest.UDPSocket_Multicast
-OutOfProcessPPAPITest.UDPSocket_ParallelSend
-OutOfProcessPPAPITest.UDPSocket_ReadWrite
-OutOfProcessPPAPITest.UDPSocket_SetOption
-OutOfProcessPPAPITest.UDPSocket_SetOption_1_0
-OutOfProcessPPAPITest.UDPSocket_SetOption_1_1
-OutOfProcessPPAPITest.UDPSocketPrivate_Connect
-PolicyTest.ExtensionInstallBlacklistSharedModules
-PolicyTest.ExtensionInstallForcelist
-PolicyTest.ExtensionInstallForcelist_DefaultedUpdateUrl
-PolicyTest.ExtensionMinimumVersionForceInstalled
-PolicyTest.ExtensionMinimumVersionRequired
-PolicyTest.ExtensionMinimumVersionRequiredAlt
-PolicyTest.ExtensionRecommendedInstallationMode
-PolicyUpdateServiceTest.Backoff
-PolicyUpdateServiceTest.FailedUpdateRetries
-PolicyUpdateServiceTest.PolicyCorruptedOnStartup
-PPAPINaClGLibcTest.UDPSocket_Broadcast
-PPAPINaClGLibcTest.UDPSocket_Multicast
-PPAPINaClGLibcTest.UDPSocket_ParallelSend
-PPAPINaClGLibcTest.UDPSocket_ReadWrite
-PPAPINaClGLibcTest.UDPSocket_SetOption
-PPAPINaClGLibcTest.UDPSocket_SetOption_1_0
-PPAPINaClGLibcTest.UDPSocket_SetOption_1_1
-PPAPINaClNewlibTest.HostResolver
-PPAPINaClNewlibTest.HostResolverPrivate_Resolve
-PPAPINaClNewlibTest.HostResolverPrivate_ResolveIPv4
-PPAPINaClNewlibTest.NetAddressPrivate
-PPAPINaClNewlibTest.TCPServerSocketPrivate
-PPAPINaClNewlibTest.TCPSocket
-PPAPINaClNewlibTest.TCPSocketPrivate
-PPAPINaClNewlibTest.UDPSocket_Broadcast
-PPAPINaClNewlibTest.UDPSocket_Multicast
-PPAPINaClNewlibTest.UDPSocket_ParallelSend
-PPAPINaClNewlibTest.UDPSocket_ReadWrite
-PPAPINaClNewlibTest.UDPSocket_SetOption
-PPAPINaClNewlibTest.UDPSocket_SetOption_1_0
-PPAPINaClNewlibTest.UDPSocket_SetOption_1_1
-PPAPINaClNewlibTest.UDPSocketPrivate_Connect
-PPAPINaClPNaClNonSfiTest.HostResolver
-PPAPINaClPNaClNonSfiTest.HostResolverPrivate_Resolve
-PPAPINaClPNaClNonSfiTest.HostResolverPrivate_ResolveIPv4
-PPAPINaClPNaClNonSfiTest.NetAddressPrivate
-PPAPINaClPNaClNonSfiTest.TCPServerSocketPrivate
-PPAPINaClPNaClNonSfiTest.TCPSocket
-PPAPINaClPNaClNonSfiTest.TCPSocketPrivate
-PPAPINaClPNaClNonSfiTest.UDPSocket_Broadcast
-PPAPINaClPNaClNonSfiTest.UDPSocket_Multicast
-PPAPINaClPNaClNonSfiTest.UDPSocket_ParallelSend
-PPAPINaClPNaClNonSfiTest.UDPSocket_ReadWrite
-PPAPINaClPNaClNonSfiTest.UDPSocket_SetOption
-PPAPINaClPNaClNonSfiTest.UDPSocket_SetOption_1_0
-PPAPINaClPNaClNonSfiTest.UDPSocket_SetOption_1_1
-PPAPINaClPNaClNonSfiTest.UDPSocketPrivate_Connect
-PreviewsOptimizationGuideBrowserTest.NoScriptPreviewsEnabledByWhitelist
-ProcessManagerBrowserTest.NestedURLNavigationsToExtensionAllowed
-ProfileBrowserTest.SeparateMediaCache
-ProfileBrowserTest.URLFetcherUsingMainContextDuringIncognitoTeardown
-ProfileBrowserTest.URLFetcherUsingMainContextDuringShutdown
-ProfileBrowserTest.URLFetcherUsingMediaContextDuringShutdown
-ProfileWithoutMediaCacheBrowserTest.NoSeparateMediaCache
-ProxySettingsApiTest.ProxyEventsInvalidProxy
-RegisterProtocolHandlerBrowserTest.CustomHandler
-SecurityStateTabHelperTest.DefaultSecurityLevelOnFilesystemUrl/0
-SecurityStateTabHelperTest.DefaultSecurityLevelOnFilesystemUrl/1
-SecurityStateTabHelperTest.DefaultSecurityLevelOnSecureFilesystemUrl/0
-SecurityStateTabHelperTest.DefaultSecurityLevelOnSecureFilesystemUrl/1
-ServiceWorkerPaymentAppFactoryBrowserTest.AllOringsSupported
-ServiceWorkerPaymentAppFactoryBrowserTest.SupportedOrigin
-ServiceWorkerPaymentAppFactoryBrowserTest.TwoAppsDifferentMethods
-ServiceWorkerPaymentAppFactoryBrowserTest.TwoAppsSameMethod
-SSLNetworkTimeBrowserTest.CloseTabBeforeNetworkFetchCompletes/0
-SSLNetworkTimeBrowserTest.CloseTabBeforeNetworkFetchCompletes/1
-SSLNetworkTimeBrowserTest.NavigateAwayBeforeTimeoutExpires/0
-SSLNetworkTimeBrowserTest.NavigateAwayBeforeTimeoutExpires/1
-SSLNetworkTimeBrowserTest.OnDemandFetchClockWrong/0
-SSLNetworkTimeBrowserTest.OnDemandFetchClockWrong/1
-SSLNetworkTimeBrowserTest.ReloadBeforeTimeoutExpires/0
-SSLNetworkTimeBrowserTest.ReloadBeforeTimeoutExpires/1
-SSLNetworkTimeBrowserTest.StopBeforeTimeoutExpires/0
-SSLNetworkTimeBrowserTest.StopBeforeTimeoutExpires/1
-SSLNetworkTimeBrowserTest.TimeoutExpiresBeforeFetchCompletes/0
-SSLNetworkTimeBrowserTest.TimeoutExpiresBeforeFetchCompletes/1
-SSLUITest.TestBadHTTPSDownload/0
-SSLUITest.TestBadHTTPSDownload/1
-SubresourceFilterBrowserTest.FailedProvisionalLoadInMainframe
-UpdateServiceTest.NoUpdate
-UpdateServiceTest.PolicyCorrupted
-UpdateServiceTest.SuccessfulUpdate
-UpdateServiceTest.TwoUpdateCheckErrors
-UpdateServiceTest.UpdateCheckError
-WebstoreInstallerBrowserTest.SimultaneousInstall
-WebUIWebViewBrowserTest.AddAndRemoveContentScripts
-WebUIWebViewBrowserTest.AddContentScript
-WebUIWebViewBrowserTest.AddContentScriptsWithNewWindowAPI
-WebUIWebViewBrowserTest.AddContentScriptWithSameNameShouldOverwriteTheExistingOne
-WebUIWebViewBrowserTest.AddMultiContentScripts
-WebUIWebViewBrowserTest.ContentScriptExistsAsLongAsWebViewTagExists
-WebUIWebViewBrowserTest.ExecuteScriptCodeFromFile
-WebViewTest.WebViewInBackgroundPage
# about:net-internals should be largely removed before shipping the network
# service.
# https://crbug.com/678391
-NetInternalsTest.netInternalsSessionBandwidthSucceed
-NetInternalsTest.netInternalsChromeOSViewStoreDebugLogs
-NetInternalsTest.netInternalsDnsViewAddTwoTwice
-NetInternalsTest.netInternalsDnsViewExpired
-NetInternalsTest.netInternalsDnsViewFail
-NetInternalsTest.netInternalsDnsViewIncognitoClears
-NetInternalsTest.netInternalsDnsViewNetworkChanged
-NetInternalsTest.netInternalsDnsViewSuccess
-NetInternalsTest.netInternalsDomainSecurityPolicyViewAddDelete
-NetInternalsTest.netInternalsDomainSecurityPolicyViewAddError
-NetInternalsTest.netInternalsDomainSecurityPolicyViewAddFail
-NetInternalsTest.netInternalsDomainSecurityPolicyViewAddOverwrite
-NetInternalsTest.netInternalsDomainSecurityPolicyViewAddTwice
-NetInternalsTest.netInternalsDomainSecurityPolicyViewDeleteError
-NetInternalsTest.netInternalsDomainSecurityPolicyViewDeleteNotFound
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddDelete
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddError
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddFail
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddOverwrite
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddTwice
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTQueryError
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTQueryNotFound
-NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTTestReport
-NetInternalsTest.netInternalsDomainSecurityPolicyViewQueryError
-NetInternalsTest.netInternalsDomainSecurityPolicyViewQueryNotFound
-NetInternalsTest.netInternalsEventsViewFilter
-NetInternalsTest.netInternalsLogUtilExportImport
-NetInternalsTest.netInternalsLogUtilImportNetLogFile
-NetInternalsTest.netInternalsLogUtilImportNetLogFileTruncated
-NetInternalsTest.netInternalsLogUtilStopCapturing
-NetInternalsTest.netInternalsLogViewPainterPrintAsText
-NetInternalsTest.netInternalsPrerenderViewFail
-NetInternalsTest.netInternalsPrerenderViewSucceed
-NetInternalsTest.netInternalsSessionBandwidthSucceed
-NetInternalsTest.netInternalsTimelineViewDegenerate
-NetInternalsTest.netInternalsTimelineViewLoadLog
-NetInternalsTest.netInternalsTimelineViewNoEvents
-NetInternalsTest.netInternalsTimelineViewRange
-NetInternalsTest.netInternalsTimelineViewScrollbar
-NetInternalsTest.netInternalsTimelineViewZoomIn
-NetInternalsTest.netInternalsTimelineViewZoomOut
-NetInternalsTest.netInternalsTourTabs
# Move ChromeExpectCTReporter to services/network
# https://crbug.com/844032
......@@ -199,6 +382,36 @@
# to work with network service.
-ConditionalCacheCountingHelperBrowserTest.Count
# Channel ID is not hooked up to the network service yet.
# https://crbug.com/840412
-JavaScriptBindings/ExternallyConnectableMessagingTest.WebConnectableWithNonEmptyTlsChannelId/0
-JavaScriptBindings/MessagingApiTest.DifferentStoragePartitionTLSChannelID/0
-NativeBindings/ExternallyConnectableMessagingTest.WebConnectableWithNonEmptyTlsChannelId/0
-NativeBindings/MessagingApiTest.DifferentStoragePartitionTLSChannelID/0
# ContentHastVerifier needs to be switched to SimpleURLLoader
# https://crbug.com/844926
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceDeleteComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceDeleteComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceKeepComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceKeepComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceTamperComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.DefaultRequestExtensionTamperNotRequestedResourceTamperComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionDeleteComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionDeleteComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionKeepComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionKeepComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionTamperComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionTamperComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperNotRequestedResourceKeepComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperNotRequestedResourceKeepComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceDeleteComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceDeleteComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceKeepComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceKeepComputedHashes/1
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceTamperComputedHashes/0
-FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceTamperComputedHashes/1
# NOTE: if adding an exclusion for an existing failure (e.g. additional test for
# feature X that is already not working), please add it beside the existing
# failures. Otherwise please reach out to network-service-dev@.
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