Commit d2a43b3c authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Hook up ChromeMojoProxyResolverFactory to the network service.

Adds an API to the NetworkService so that it can take in a
mojom::ProxyResolverFactory, and makes Chrome's
CreateDefaultNetworkContextParams method add an InterfracePtr
that points at ChromeMojoProxyResolverFactory.

Also moves ChromeMojoProxyResolverFactories from the IO to
the UI thread, and removes the old code to create them from
the legacy IOThread and ProfileIOData classes.


Bug: 754007
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I89f77ddfb9511494f1f32a596f3a67509cd5b1e3
Reviewed-on: https://chromium-review.googlesource.com/768216
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Reviewed-by: default avatarJay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521514}
parent a689479f
......@@ -34,7 +34,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/data_usage/tab_id_annotator.h"
#include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h"
#include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/dns_probe_service.h"
#include "chrome/browser/net/proxy_service_factory.h"
......@@ -724,24 +723,10 @@ bool IOThread::PacHttpsUrlStrippingEnabled() const {
void IOThread::SetUpProxyService(
content::URLRequestContextBuilderMojo* builder) const {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
// TODO(eroman): Figure out why this doesn't work in single-process mode.
// Should be possible now that a private isolate is used.
// http://crbug.com/474654
if (!command_line.HasSwitch(switches::kWinHttpProxyResolver)) {
if (command_line.HasSwitch(switches::kSingleProcess)) {
LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
} else {
builder->SetMojoProxyResolverFactory(
ChromeMojoProxyResolverFactory::CreateWithStrongBinding());
#if defined(OS_CHROMEOS)
builder->SetDhcpFetcherFactory(
base::MakeUnique<chromeos::DhcpProxyScriptFetcherFactoryChromeos>());
builder->SetDhcpFetcherFactory(
base::MakeUnique<chromeos::DhcpProxyScriptFetcherFactoryChromeos>());
#endif
}
}
builder->set_pac_quick_check_enabled(WpadQuickCheckEnabled());
builder->set_pac_sanitize_url_policy(
......
......@@ -35,8 +35,8 @@
#include "net/base/network_change_notifier.h"
#include "net/nqe/network_quality_estimator.h"
class PrefService;
class PrefRegistrySimple;
class PrefService;
class SystemNetworkContextManager;
#if defined(OS_ANDROID)
......@@ -210,8 +210,7 @@ class IOThread : public content::BrowserThreadDelegate {
bool WpadQuickCheckEnabled() const;
bool PacHttpsUrlStrippingEnabled() const;
// Configures |builder|'s ProxyService based on prefs, policies, and the
// command line.
// Configures |builder|'s ProxyService based on prefs and policies.
void SetUpProxyService(content::URLRequestContextBuilderMojo* builder) const;
// Gets a pointer to the NetworkService. Can only be called on the UI thread.
......
......@@ -301,52 +301,4 @@ IN_PROC_BROWSER_TEST_F(IOThreadBrowserTestWithHangingPacRequest, Shutdown) {
connection_listener_->WaitForConnections();
}
class IOThreadBrowserTestWithPacFileURL : public IOThreadBrowserTest {
public:
IOThreadBrowserTestWithPacFileURL() {
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
}
~IOThreadBrowserTestWithPacFileURL() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
base::FilePath pac_file_path;
ASSERT_TRUE(
base::CreateTemporaryFileInDir(temp_dir_.GetPath(), &pac_file_path));
std::string pac_script = base::StringPrintf(
"function FindProxyForURL(url, host){ return 'PROXY %s;'; }",
net::HostPortPair::FromURL(embedded_test_server()->base_url())
.ToString()
.c_str());
ASSERT_EQ(
static_cast<int>(pac_script.size()),
base::WriteFile(pac_file_path, pac_script.c_str(), pac_script.size()));
command_line->AppendSwitchASCII(
switches::kProxyPacUrl, net::FilePathToFileURL(pac_file_path).spec());
}
protected:
base::ScopedTempDir temp_dir_;
};
// Make sure the system URLRequestContext can hadle fetching PAC scripts from
// file URLs.
IN_PROC_BROWSER_TEST_F(IOThreadBrowserTestWithPacFileURL, FilePac) {
TestURLFetcherDelegate fetcher_delegate;
std::unique_ptr<net::URLFetcher> fetcher =
net::URLFetcher::Create(GURL("http://foo.test:12345/echoheader?Foo"),
net::URLFetcher::GET, &fetcher_delegate);
fetcher->AddExtraRequestHeader("Foo: Bar");
fetcher->SetRequestContext(
g_browser_process->io_thread()->system_url_request_context_getter());
fetcher->Start();
fetcher_delegate.WaitForCompletion();
EXPECT_EQ(200, fetcher->GetResponseCode());
std::string response;
ASSERT_TRUE(fetcher->GetResponseAsString(&response));
EXPECT_EQ("Bar", response);
}
} // namespace
......@@ -14,23 +14,12 @@
#include "content/public/common/service_manager_connection.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
namespace {
void BindConnectorOnUIThread(service_manager::mojom::ConnectorRequest request) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::ServiceManagerConnection::GetForProcess()
->GetConnector()
->BindConnectorRequest(std::move(request));
}
} // namespace
ChromeMojoProxyResolverFactory::ChromeMojoProxyResolverFactory() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
ChromeMojoProxyResolverFactory::~ChromeMojoProxyResolverFactory() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
proxy_resolver::mojom::ProxyResolverFactoryPtr
......@@ -45,34 +34,16 @@ void ChromeMojoProxyResolverFactory::CreateResolver(
const std::string& pac_script,
proxy_resolver::mojom::ProxyResolverRequest req,
proxy_resolver::mojom::ProxyResolverFactoryRequestClientPtr client) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
InitServiceManagerConnector();
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// Bind a ProxyResolverFactory backed by the proxy resolver service, have it
// create a ProxyResolverFactory and then destroy the factory, to avoid
// keeping the service alive after all resolvers have been destroyed.
proxy_resolver::mojom::ProxyResolverFactoryPtr resolver_factory;
service_manager_connector_->BindInterface(
proxy_resolver::mojom::kProxyResolverServiceName,
mojo::MakeRequest(&resolver_factory));
content::ServiceManagerConnection::GetForProcess()
->GetConnector()
->BindInterface(proxy_resolver::mojom::kProxyResolverServiceName,
mojo::MakeRequest(&resolver_factory));
resolver_factory->CreateResolver(pac_script, std::move(req),
std::move(client));
}
void ChromeMojoProxyResolverFactory::InitServiceManagerConnector() {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
if (service_manager_connector_)
return;
// The existing ServiceManagerConnection retrieved with
// ServiceManagerConnection::GetForProcess() lives on the UI thread, so we
// can't access it from here. We create our own connector so it can be used
// right away and will bind it on the UI thread.
service_manager::mojom::ConnectorRequest request;
service_manager_connector_ = service_manager::Connector::Create(&request);
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&BindConnectorOnUIThread, base::Passed(&request)));
}
......@@ -17,7 +17,7 @@
// Starts the service as needed, and maintains no active mojo pipes to it,
// so that it's automatically shut down as needed.
//
// ChromeMojoProxyResolverFactories must be created and used only on the IO
// ChromeMojoProxyResolverFactories must be created and used only on the UI
// thread.
class ChromeMojoProxyResolverFactory
: public proxy_resolver::mojom::ProxyResolverFactory {
......@@ -38,9 +38,6 @@ class ChromeMojoProxyResolverFactory
override;
private:
// Initializes the ServiceManager's connector if it hasn't been already.
void InitServiceManagerConnector();
std::unique_ptr<service_manager::Connector> service_manager_connector_;
DISALLOW_COPY_AND_ASSIGN(ChromeMojoProxyResolverFactory);
......
......@@ -110,34 +110,6 @@ class TestServiceManagerListener
DISALLOW_COPY_AND_ASSIGN(TestServiceManagerListener);
};
// Creates a ProxyResolverFactory on the IO thread that can then be used on the
// UI thread.
proxy_resolver::mojom::ProxyResolverFactoryPtr
CreateResolverFactoryOnIOThread() {
base::RunLoop run_loop;
proxy_resolver::mojom::ProxyResolverFactoryPtrInfo resolver_factory_info;
content::BrowserThread::PostTaskAndReply(
content::BrowserThread::IO, FROM_HERE,
base::Bind(
[](mojo::InterfacePtrInfo<
proxy_resolver::mojom::ProxyResolverFactory>*
resolver_factory_info) {
// Getting the InterfacePtr to an InterfacePtrInfo allows it to be
// passed to another thread.
*resolver_factory_info =
ChromeMojoProxyResolverFactory::CreateWithStrongBinding()
.PassInterface();
},
&resolver_factory_info),
run_loop.QuitClosure());
run_loop.Run();
proxy_resolver::mojom::ProxyResolverFactoryPtr resolver_factory;
resolver_factory.Bind(std::move(resolver_factory_info));
return resolver_factory;
}
// Dummy consumer of a ProxyResolverFactory. It just calls CreateResolver, and
// keeps Mojo objects alive from when CreateResolver() is called until it's
// destroyed.
......@@ -206,7 +178,7 @@ IN_PROC_BROWSER_TEST_F(ChromeMojoProxyResolverFactoryBrowserTest,
ServiceLifecycle) {
// Set up the ProxyResolverFactory.
proxy_resolver::mojom::ProxyResolverFactoryPtr resolver_factory =
CreateResolverFactoryOnIOThread();
ChromeMojoProxyResolverFactory::CreateWithStrongBinding();
// Create a resolver, this should create and start the service.
std::unique_ptr<DumbProxyResolverFactoryRequestClient> resolver_client1 =
......@@ -246,7 +218,7 @@ IN_PROC_BROWSER_TEST_F(ChromeMojoProxyResolverFactoryBrowserTest,
DestroyFactory) {
// Set up the ProxyResolverFactory.
proxy_resolver::mojom::ProxyResolverFactoryPtr resolver_factory =
CreateResolverFactoryOnIOThread();
ChromeMojoProxyResolverFactory::CreateWithStrongBinding();
// Create a resolver, this should create and start the service.
std::unique_ptr<DumbProxyResolverFactoryRequestClient> resolver_client1 =
......@@ -288,7 +260,7 @@ IN_PROC_BROWSER_TEST_F(ChromeMojoProxyResolverFactoryBrowserTest,
DestroyAndCreateService) {
// Set up the ProxyResolverFactory.
proxy_resolver::mojom::ProxyResolverFactoryPtr resolver_factory =
CreateResolverFactoryOnIOThread();
ChromeMojoProxyResolverFactory::CreateWithStrongBinding();
// Create a resolver, this should create and start the service.
std::unique_ptr<DumbProxyResolverFactoryRequestClient> resolver_client =
......
......@@ -6,17 +6,22 @@
#include <string>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/core/common/policy_service.h"
#include "components/policy/policy_constants.h"
#include "components/version_info/version_info.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
#include "services/proxy_resolver/public/interfaces/proxy_resolver.mojom.h"
content::mojom::NetworkContextParamsPtr CreateDefaultNetworkContextParams() {
content::mojom::NetworkContextParamsPtr network_context_params =
......@@ -34,6 +39,23 @@ content::mojom::NetworkContextParamsPtr CreateDefaultNetworkContextParams() {
quic_user_agent_id.append(content::BuildOSCpuInfo());
network_context_params->quic_user_agent_id = quic_user_agent_id;
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
// TODO(eroman): Figure out why this doesn't work in single-process mode,
// or if it does work, now.
// Should be possible now that a private isolate is used.
// http://crbug.com/474654
if (!command_line.HasSwitch(switches::kWinHttpProxyResolver)) {
if (command_line.HasSwitch(switches::kSingleProcess)) {
LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode.";
} else {
network_context_params->proxy_resolver_factory =
ChromeMojoProxyResolverFactory::CreateWithStrongBinding()
.PassInterface();
}
}
bool http_09_on_non_default_ports_enabled = false;
const base::Value* value =
g_browser_process->policy_service()
......
......@@ -179,107 +179,6 @@ IN_PROC_BROWSER_TEST_F(HttpProxyScriptBrowserTest, Verify) {
VerifyProxyScript(browser());
}
// Fetch PAC script via a file:// URL.
class FileProxyScriptBrowserTest : public InProcessBrowserTest {
public:
FileProxyScriptBrowserTest() {}
~FileProxyScriptBrowserTest() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitchASCII(switches::kProxyPacUrl,
ui_test_utils::GetTestUrl(
base::FilePath(base::FilePath::kCurrentDirectory),
base::FilePath(kPACScript)).spec());
}
private:
DISALLOW_COPY_AND_ASSIGN(FileProxyScriptBrowserTest);
};
IN_PROC_BROWSER_TEST_F(FileProxyScriptBrowserTest, Verify) {
VerifyProxyScript(browser());
}
// Fetch PAC script via an ftp:// URL.
class FtpProxyScriptBrowserTest : public InProcessBrowserTest {
public:
FtpProxyScriptBrowserTest()
: ftp_server_(net::SpawnedTestServer::TYPE_FTP,
base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))) {}
~FtpProxyScriptBrowserTest() override {}
void SetUp() override {
ASSERT_TRUE(ftp_server_.Start());
InProcessBrowserTest::SetUp();
}
void SetUpCommandLine(base::CommandLine* command_line) override {
base::FilePath pac_script_path(kPACScript);
command_line->AppendSwitchASCII(
switches::kProxyPacUrl,
ftp_server_.GetURL(pac_script_path.MaybeAsASCII()).spec());
}
private:
net::SpawnedTestServer ftp_server_;
DISALLOW_COPY_AND_ASSIGN(FtpProxyScriptBrowserTest);
};
IN_PROC_BROWSER_TEST_F(FtpProxyScriptBrowserTest, Verify) {
VerifyProxyScript(browser());
}
// Fetch PAC script via a data: URL.
class DataProxyScriptBrowserTest : public InProcessBrowserTest {
public:
DataProxyScriptBrowserTest() {}
~DataProxyScriptBrowserTest() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
std::string contents;
// Read in kPACScript contents.
ASSERT_TRUE(base::ReadFileToString(ui_test_utils::GetTestFilePath(
base::FilePath(base::FilePath::kCurrentDirectory),
base::FilePath(kPACScript)),
&contents));
command_line->AppendSwitchASCII(switches::kProxyPacUrl,
std::string("data:,") + contents);
}
private:
DISALLOW_COPY_AND_ASSIGN(DataProxyScriptBrowserTest);
};
IN_PROC_BROWSER_TEST_F(DataProxyScriptBrowserTest, Verify) {
VerifyProxyScript(browser());
}
// Fetch PAC script via a data: URL.
class OutOfProcessProxyResolverBrowserTest : public InProcessBrowserTest {
public:
OutOfProcessProxyResolverBrowserTest() {}
~OutOfProcessProxyResolverBrowserTest() override {}
void SetUpCommandLine(base::CommandLine* command_line) override {
std::string contents;
// Read in kPACScript contents.
ASSERT_TRUE(base::ReadFileToString(ui_test_utils::GetTestFilePath(
base::FilePath(base::FilePath::kCurrentDirectory),
base::FilePath(kPACScript)),
&contents));
command_line->AppendSwitchASCII(
switches::kProxyPacUrl, "data:," + contents);
}
private:
DISALLOW_COPY_AND_ASSIGN(OutOfProcessProxyResolverBrowserTest);
};
IN_PROC_BROWSER_TEST_F(OutOfProcessProxyResolverBrowserTest, Verify) {
VerifyProxyScript(browser());
}
// Fetch PAC script via a hanging http:// URL.
class HangingPacRequestProxyScriptBrowserTest : public InProcessBrowserTest {
public:
......
......@@ -34,6 +34,7 @@
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/network/ignore_errors_cert_verifier.h"
#include "content/public/network/url_request_context_builder_mojo.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/dns/host_resolver.h"
#include "net/dns/mapped_host_resolver.h"
......@@ -69,7 +70,7 @@ NetworkContext::NetworkContext(
NetworkServiceImpl* network_service,
mojom::NetworkContextRequest request,
mojom::NetworkContextParamsPtr params,
std::unique_ptr<net::URLRequestContextBuilder> builder)
std::unique_ptr<URLRequestContextBuilderMojo> builder)
: network_service_(network_service),
params_(std::move(params)),
binding_(this, std::move(request)) {
......@@ -203,7 +204,7 @@ NetworkContext::DiskChecker::~DiskChecker() = default;
std::unique_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
mojom::NetworkContextParams* network_context_params) {
net::URLRequestContextBuilder builder;
URLRequestContextBuilderMojo builder;
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
......@@ -231,7 +232,7 @@ std::unique_ptr<net::URLRequestContext> NetworkContext::MakeURLRequestContext(
}
void NetworkContext::ApplyContextParamsToBuilder(
net::URLRequestContextBuilder* builder,
URLRequestContextBuilderMojo* builder,
mojom::NetworkContextParams* network_context_params) {
// |network_service_| may be nullptr in tests.
if (network_service_)
......@@ -241,6 +242,12 @@ void NetworkContext::ApplyContextParamsToBuilder(
if (network_context_params->context_name)
builder->set_name(*network_context_params->context_name);
if (network_context_params->proxy_resolver_factory) {
builder->SetMojoProxyResolverFactory(
proxy_resolver::mojom::ProxyResolverFactoryPtr(
std::move(network_context_params->proxy_resolver_factory)));
}
if (!network_context_params->http_cache_enabled) {
builder->DisableHttpCache();
} else {
......
......@@ -25,13 +25,13 @@ class PrefService;
namespace net {
class URLRequestContext;
class URLRequestContextBuilder;
class HttpServerPropertiesManager;
}
namespace content {
class NetworkServiceImpl;
class URLLoader;
class URLRequestContextBuilderMojo;
// A NetworkContext creates and manages access to a URLRequestContext.
//
......@@ -42,7 +42,7 @@ class URLLoader;
//
// When the network service is disabled, NetworkContexts may be created through
// NetworkServiceImpl::CreateNetworkContextWithBuilder, and take in a
// URLRequestContextBuilder to seed construction of the NetworkContext's
// URLRequestContextBuilderMojo to seed construction of the NetworkContext's
// URLRequestContext. When that happens, the consumer takes ownership of the
// NetworkContext directly, has direct access to its URLRequestContext, and is
// responsible for destroying it before the NetworkService.
......@@ -53,11 +53,11 @@ class CONTENT_EXPORT NetworkContext : public mojom::NetworkContext {
mojom::NetworkContextParamsPtr params);
// Temporary constructor that allows creating an in-process NetworkContext
// with a pre-populated URLRequestContextBuilder.
// with a pre-populated URLRequestContextBuilderMojo.
NetworkContext(NetworkServiceImpl* network_service,
mojom::NetworkContextRequest request,
mojom::NetworkContextParamsPtr params,
std::unique_ptr<net::URLRequestContextBuilder> builder);
std::unique_ptr<URLRequestContextBuilderMojo> builder);
// Creates a NetworkContext that wraps a consumer-provided URLRequestContext
// that the NetworkContext does not own. In this case, there is no
......@@ -115,7 +115,7 @@ class CONTENT_EXPORT NetworkContext : public mojom::NetworkContext {
// Applies the values in |network_context_params| to |builder|.
void ApplyContextParamsToBuilder(
net::URLRequestContextBuilder* builder,
URLRequestContextBuilderMojo* builder,
mojom::NetworkContextParams* network_context_params);
NetworkServiceImpl* const network_service_;
......
......@@ -13,6 +13,7 @@
#include "build/build_config.h"
#include "content/network/network_context.h"
#include "content/public/common/content_switches.h"
#include "content/public/network/url_request_context_builder_mojo.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/logging_network_change_observer.h"
#include "net/base/network_change_notifier.h"
......@@ -138,7 +139,7 @@ std::unique_ptr<mojom::NetworkContext>
NetworkServiceImpl::CreateNetworkContextWithBuilder(
content::mojom::NetworkContextRequest request,
content::mojom::NetworkContextParamsPtr params,
std::unique_ptr<net::URLRequestContextBuilder> builder,
std::unique_ptr<URLRequestContextBuilderMojo> builder,
net::URLRequestContext** url_request_context) {
std::unique_ptr<NetworkContext> network_context =
std::make_unique<NetworkContext>(this, std::move(request),
......
......@@ -23,12 +23,12 @@ namespace net {
class NetLog;
class LoggingNetworkChangeObserver;
class URLRequestContext;
class URLRequestContextBuilder;
} // namespace net
namespace content {
class NetworkContext;
class URLRequestContextBuilderMojo;
class CONTENT_EXPORT NetworkServiceImpl : public service_manager::Service,
public NetworkService {
......@@ -47,7 +47,7 @@ class CONTENT_EXPORT NetworkServiceImpl : public service_manager::Service,
std::unique_ptr<mojom::NetworkContext> CreateNetworkContextWithBuilder(
content::mojom::NetworkContextRequest request,
content::mojom::NetworkContextParamsPtr params,
std::unique_ptr<net::URLRequestContextBuilder> builder,
std::unique_ptr<URLRequestContextBuilderMojo> builder,
net::URLRequestContext** url_request_context) override;
static std::unique_ptr<NetworkServiceImpl> CreateForTesting();
......
......@@ -374,6 +374,7 @@ mojom("interfaces") {
":resource_type_bindings",
"//mojo/common:common_custom_types",
"//services/network/public/interfaces",
"//services/proxy_resolver/public/interfaces",
"//url/mojo:url_mojom_gurl",
"//url/mojo:url_mojom_origin",
]
......
......@@ -14,6 +14,7 @@ import "url/mojo/url.mojom";
import "services/network/public/interfaces/cookie_manager.mojom";
import "services/network/public/interfaces/network_change_manager.mojom";
import "services/network/public/interfaces/restricted_cookie_manager.mojom";
import "services/proxy_resolver/public/interfaces/proxy_resolver.mojom";
[Native]
struct SSLInfo;
......@@ -29,6 +30,11 @@ struct NetworkContextParams {
// QUIC user agent.
string quic_user_agent_id;
// Handles PAC script execution. If not populated, will attempt to use
// platform implementation to execute PAC scripts, if available (Only
// available on Windows and Mac).
proxy_resolver.mojom.ProxyResolverFactory? proxy_resolver_factory;
// Points to the cookie file. Currently ignored. An in-memory cookie store is
// always used instead.
// TODO(mmenke): Respect this parameter.
......
......@@ -13,11 +13,12 @@
namespace net {
class NetLog;
class URLRequestContext;
class URLRequestContextBuilder;
} // namespace net
namespace content {
class URLRequestContextBuilderMojo;
// Allows an in-process NetworkService to be set up.
class CONTENT_EXPORT NetworkService : public mojom::NetworkService {
public:
......@@ -44,7 +45,7 @@ class CONTENT_EXPORT NetworkService : public mojom::NetworkService {
CreateNetworkContextWithBuilder(
mojom::NetworkContextRequest request,
mojom::NetworkContextParamsPtr params,
std::unique_ptr<net::URLRequestContextBuilder> builder,
std::unique_ptr<URLRequestContextBuilderMojo> builder,
net::URLRequestContext** url_request_context) = 0;
~NetworkService() override {}
......
......@@ -486,7 +486,6 @@
# use Mojo APIs instead.
-HangingPacRequestProxyScriptBrowserTest.Shutdown
-IOThreadBrowserTestWithHangingPacRequest.Shutdown
-IOThreadBrowserTestWithPacFileURL.FilePac
-ProxySettingsApiTest.ProxyEventsParseError
# http://crbug.com/783996
......
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