Commit 08d43079 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Make net::DataProtocolHandler a test-only class.

It was only being used on iOS, but the system handles
wkWebView-initiated data URL requests there, and they aren't needed for
internal requests, so this CL also removes all of iOS's uses of the
class.

I'll remove DataProtocolHander and URLRequestDataJob in followup CLs
that make sure we don't lose test coverage of the data URL parsing code,
which is still in use.

Change-Id: I5e6789b36c457a7ab06f7a8e0c1cf1dcee2929b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868837
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707574}
parent 060e8b40
...@@ -22,6 +22,7 @@ namespace net { ...@@ -22,6 +22,7 @@ namespace net {
class CookieStore; class CookieStore;
class HttpNetworkSession; class HttpNetworkSession;
class HttpTransactionFactory; class HttpTransactionFactory;
class URLRequestJobFactoryImpl;
} // namespace net } // namespace net
class ChromeBrowserStateImplIOData : public ChromeBrowserStateIOData { class ChromeBrowserStateImplIOData : public ChromeBrowserStateIOData {
...@@ -129,7 +130,7 @@ class ChromeBrowserStateImplIOData : public ChromeBrowserStateIOData { ...@@ -129,7 +130,7 @@ class ChromeBrowserStateImplIOData : public ChromeBrowserStateIOData {
mutable std::unique_ptr<net::CookieStore> main_cookie_store_; mutable std::unique_ptr<net::CookieStore> main_cookie_store_;
mutable std::unique_ptr<net::URLRequestJobFactory> main_job_factory_; mutable std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory_;
// Parameters needed for isolated apps. // Parameters needed for isolated apps.
base::FilePath profile_path_; base::FilePath profile_path_;
......
...@@ -226,12 +226,9 @@ void ChromeBrowserStateImplIOData::InitializeInternal( ...@@ -226,12 +226,9 @@ void ChromeBrowserStateImplIOData::InitializeInternal(
std::move(main_backend)); std::move(main_backend));
main_context->set_http_transaction_factory(main_http_factory_.get()); main_context->set_http_transaction_factory(main_http_factory_.get());
std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( main_job_factory_ = std::make_unique<net::URLRequestJobFactoryImpl>();
new net::URLRequestJobFactoryImpl()); InstallProtocolHandlers(main_job_factory_.get(), protocol_handlers);
InstallProtocolHandlers(main_job_factory.get(), protocol_handlers);
main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory),
main_context->network_delegate());
main_context->set_job_factory(main_job_factory_.get()); main_context->set_job_factory(main_job_factory_.get());
lazy_params_.reset(); lazy_params_.reset();
......
...@@ -166,10 +166,6 @@ class ChromeBrowserStateIOData { ...@@ -166,10 +166,6 @@ class ChromeBrowserStateIOData {
void InitializeOnUIThread(ios::ChromeBrowserState* browser_state); void InitializeOnUIThread(ios::ChromeBrowserState* browser_state);
void ApplyProfileParamsToContext(net::URLRequestContext* context) const; void ApplyProfileParamsToContext(net::URLRequestContext* context) const;
std::unique_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults(
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory,
net::NetworkDelegate* network_delegate) const;
// Called when the ChromeBrowserState is destroyed. |context_getters| must // Called when the ChromeBrowserState is destroyed. |context_getters| must
// include all URLRequestContextGetters that refer to the // include all URLRequestContextGetters that refer to the
// ChromeBrowserStateIOData's URLRequestContexts. Triggers destruction of the // ChromeBrowserStateIOData's URLRequestContexts. Triggers destruction of the
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
#include "net/proxy_resolution/proxy_config_service_fixed.h" #include "net/proxy_resolution/proxy_config_service_fixed.h"
#include "net/proxy_resolution/proxy_resolution_service.h" #include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/report_sender.h" #include "net/url_request/report_sender.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
...@@ -374,17 +373,6 @@ void ChromeBrowserStateIOData::ApplyProfileParamsToContext( ...@@ -374,17 +373,6 @@ void ChromeBrowserStateIOData::ApplyProfileParamsToContext(
context->set_http_user_agent_settings(chrome_http_user_agent_settings_.get()); context->set_http_user_agent_settings(chrome_http_user_agent_settings_.get());
} }
std::unique_ptr<net::URLRequestJobFactory>
ChromeBrowserStateIOData::SetUpJobFactoryDefaults(
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory,
net::NetworkDelegate* network_delegate) const {
bool set_protocol = job_factory->SetProtocolHandler(
url::kDataScheme, std::make_unique<net::DataProtocolHandler>());
DCHECK(set_protocol);
return job_factory;
}
void ChromeBrowserStateIOData::ShutdownOnUIThread( void ChromeBrowserStateIOData::ShutdownOnUIThread(
std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters) { std::unique_ptr<IOSChromeURLRequestContextGetterVector> context_getters) {
DCHECK_CURRENTLY_ON(web::WebThread::UI); DCHECK_CURRENTLY_ON(web::WebThread::UI);
......
...@@ -24,6 +24,7 @@ namespace net { ...@@ -24,6 +24,7 @@ namespace net {
class CookieStore; class CookieStore;
class HttpNetworkSession; class HttpNetworkSession;
class HttpTransactionFactory; class HttpTransactionFactory;
class URLRequestJobFactoryImpl;
} // namespace net } // namespace net
// OffTheRecordChromeBrowserState owns a // OffTheRecordChromeBrowserState owns a
...@@ -101,7 +102,7 @@ class OffTheRecordChromeBrowserStateIOData : public ChromeBrowserStateIOData { ...@@ -101,7 +102,7 @@ class OffTheRecordChromeBrowserStateIOData : public ChromeBrowserStateIOData {
mutable std::unique_ptr<net::CookieStore> main_cookie_store_; mutable std::unique_ptr<net::CookieStore> main_cookie_store_;
mutable std::unique_ptr<net::URLRequestJobFactory> main_job_factory_; mutable std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory_;
// Server bound certificates and cookies are persisted to the disk on iOS. // Server bound certificates and cookies are persisted to the disk on iOS.
base::FilePath cookie_path_; base::FilePath cookie_path_;
......
...@@ -186,11 +186,8 @@ void OffTheRecordChromeBrowserStateIOData::InitializeInternal( ...@@ -186,11 +186,8 @@ void OffTheRecordChromeBrowserStateIOData::InitializeInternal(
main_context->set_http_transaction_factory(main_http_factory_.get()); main_context->set_http_transaction_factory(main_http_factory_.get());
std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( main_job_factory_ = std::make_unique<net::URLRequestJobFactoryImpl>();
new net::URLRequestJobFactoryImpl());
InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); InstallProtocolHandlers(main_job_factory_.get(), protocol_handlers);
main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory),
main_context->network_delegate());
main_context->set_job_factory(main_job_factory_.get()); main_context->set_job_factory(main_job_factory_.get());
} }
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#include "net/socket/tcp_client_socket.h" #include "net/socket/tcp_client_socket.h"
#include "net/spdy/spdy_session.h" #include "net/spdy/spdy_session.h"
#include "net/ssl/ssl_config_service_defaults.h" #include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_builder.h" #include "net/url_request/url_request_context_builder.h"
...@@ -360,11 +359,6 @@ net::URLRequestContext* IOSIOThread::ConstructSystemRequestContext( ...@@ -360,11 +359,6 @@ net::URLRequestContext* IOSIOThread::ConstructSystemRequestContext(
net::URLRequestJobFactoryImpl* system_job_factory = net::URLRequestJobFactoryImpl* system_job_factory =
new net::URLRequestJobFactoryImpl(); new net::URLRequestJobFactoryImpl();
// Data URLs are always loaded through the system request context on iOS
// (due to UIWebView limitations).
bool set_protocol = system_job_factory->SetProtocolHandler(
url::kDataScheme, std::make_unique<net::DataProtocolHandler>());
DCHECK(set_protocol);
globals->system_url_request_job_factory.reset(system_job_factory); globals->system_url_request_job_factory.reset(system_job_factory);
context->set_job_factory(globals->system_url_request_job_factory.get()); context->set_job_factory(globals->system_url_request_job_factory.get());
......
...@@ -73,25 +73,6 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) { ...@@ -73,25 +73,6 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) {
NSURL* url = NSURLWithGURL(request->url()); NSURL* url = NSURLWithGURL(request->url());
DCHECK(url); DCHECK(url);
// The default iOS stack returns a NSURLResponse when the request has a data
// scheme, and a NSHTTPURLResponse otherwise.
if (request->url().SchemeIs("data")) {
std::string mt;
request->GetMimeType(&mt);
NSString* mime_type = base::SysUTF8ToNSString(mt);
DCHECK(mime_type);
std::string cs;
request->GetCharset(&cs);
NSString* charset = base::SysUTF8ToNSString(cs);
DCHECK(charset);
// The default iOS stack computes the length of the decoded string. If we
// wanted to do that we would have to decode the string now. However, using
// the unknown length (-1) seems to be working.
return [[NSURLResponse alloc] initWithURL:url
MIMEType:mime_type
expectedContentLength:-1
textEncodingName:charset];
} else {
// Iterate over all the headers and copy them. // Iterate over all the headers and copy them.
bool has_content_type_header = false; bool has_content_type_header = false;
NSMutableDictionary* header_fields = [NSMutableDictionary dictionary]; NSMutableDictionary* header_fields = [NSMutableDictionary dictionary];
...@@ -180,7 +161,6 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) { ...@@ -180,7 +161,6 @@ NSURLResponse* GetNSURLResponseForRequest(URLRequest* request) {
statusCode:request->GetResponseCode() statusCode:request->GetResponseCode()
HTTPVersion:version_string HTTPVersion:version_string
headerFields:header_fields]; headerFields:header_fields];
}
} }
void CopyHttpHeaders(NSURLRequest* in_request, URLRequest* out_request) { void CopyHttpHeaders(NSURLRequest* in_request, URLRequest* out_request) {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "net/base/upload_bytes_element_reader.h" #include "net/base/upload_bytes_element_reader.h"
#include "net/http/http_request_headers.h" #include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory.h" #include "net/url_request/url_request_job_factory.h"
...@@ -44,8 +43,6 @@ namespace net { ...@@ -44,8 +43,6 @@ namespace net {
namespace { namespace {
const char* kTextHtml = "text/html"; const char* kTextHtml = "text/html";
const char* kTextPlain = "text/plain";
const char* kAscii = "US-ASCII";
class HeadersURLRequestJob : public URLRequestJob { class HeadersURLRequestJob : public URLRequestJob {
public: public:
...@@ -116,40 +113,9 @@ class ProtocolHandlerUtilTest : public PlatformTest, ...@@ -116,40 +113,9 @@ class ProtocolHandlerUtilTest : public PlatformTest,
// Ownership of the protocol handlers is transferred to the factory. // Ownership of the protocol handlers is transferred to the factory.
job_factory_.SetProtocolHandler("http", job_factory_.SetProtocolHandler("http",
base::WrapUnique(new NetProtocolHandler)); base::WrapUnique(new NetProtocolHandler));
job_factory_.SetProtocolHandler("data",
base::WrapUnique(new DataProtocolHandler));
request_context_->set_job_factory(&job_factory_); request_context_->set_job_factory(&job_factory_);
} }
NSURLResponse* BuildDataURLResponse(const std::string& mime_type,
const std::string& encoding,
const std::string& content) {
// Build an URL in the form "data:<mime_type>;charset=<encoding>,<content>"
// The ';' is removed if mime_type or charset is empty.
std::string url_string = std::string("data:") + mime_type;
if (!encoding.empty())
url_string += ";charset=" + encoding;
url_string += ",";
GURL url(url_string);
std::unique_ptr<URLRequest> request(
request_context_->CreateRequest(url, DEFAULT_PRIORITY, this));
request->Start();
base::RunLoop loop;
loop.RunUntilIdle();
return GetNSURLResponseForRequest(request.get());
}
void CheckDataResponse(NSURLResponse* response,
const std::string& mime_type,
const std::string& encoding) {
EXPECT_NSEQ(base::SysUTF8ToNSString(mime_type), [response MIMEType]);
EXPECT_NSEQ(base::SysUTF8ToNSString(encoding), [response textEncodingName]);
// The response class must be NSURLResponse (and not NSHTTPURLResponse) when
// the scheme is "data".
EXPECT_TRUE([response isMemberOfClass:[NSURLResponse class]]);
}
void OnResponseStarted(URLRequest* request, int net_error) override {} void OnResponseStarted(URLRequest* request, int net_error) override {}
void OnReadCompleted(URLRequest* request, int bytes_read) override {} void OnReadCompleted(URLRequest* request, int bytes_read) override {}
...@@ -161,16 +127,6 @@ class ProtocolHandlerUtilTest : public PlatformTest, ...@@ -161,16 +127,6 @@ class ProtocolHandlerUtilTest : public PlatformTest,
} // namespace } // namespace
TEST_F(ProtocolHandlerUtilTest, GetResponseDataSchemeTest) {
NSURLResponse* response;
// MIME type and charset are correctly carried over.
response = BuildDataURLResponse("?mime=type'", "$(charset-*", "content");
CheckDataResponse(response, "?mime=type'", "$(charset-*");
// Missing values are treated as default values.
response = BuildDataURLResponse("", "", "content");
CheckDataResponse(response, kTextPlain, kAscii);
}
TEST_F(ProtocolHandlerUtilTest, GetResponseHttpTest) { TEST_F(ProtocolHandlerUtilTest, GetResponseHttpTest) {
// Create a request. // Create a request.
GURL url(std::string("http://url")); GURL url(std::string("http://url"));
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "net/proxy_resolution/proxy_resolution_service.h" #include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/ssl/ssl_config_service_defaults.h" #include "net/ssl/ssl_config_service_defaults.h"
#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_context_storage.h"
...@@ -145,10 +144,6 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() { ...@@ -145,10 +144,6 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl()); new net::URLRequestJobFactoryImpl());
bool set_protocol = job_factory->SetProtocolHandler(
"data", base::WrapUnique(new net::DataProtocolHandler));
DCHECK(set_protocol);
storage_->set_job_factory(std::move(job_factory)); storage_->set_job_factory(std::move(job_factory));
} }
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "net/proxy_resolution/proxy_resolution_service.h" #include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/ssl/ssl_config_service_defaults.h" #include "net/ssl/ssl_config_service_defaults.h"
#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_context_storage.h"
...@@ -155,9 +154,6 @@ net::URLRequestContext* WebViewURLRequestContextGetter::GetURLRequestContext() { ...@@ -155,9 +154,6 @@ net::URLRequestContext* WebViewURLRequestContextGetter::GetURLRequestContext() {
std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
new net::URLRequestJobFactoryImpl()); new net::URLRequestJobFactoryImpl());
bool set_protocol = job_factory->SetProtocolHandler(
"data", std::make_unique<net::DataProtocolHandler>());
DCHECK(set_protocol);
storage_->set_job_factory(std::move(job_factory)); storage_->set_job_factory(std::move(job_factory));
} }
......
...@@ -1791,8 +1791,6 @@ component("net") { ...@@ -1791,8 +1791,6 @@ component("net") {
"third_party/quiche/src/spdy/platform/api/spdy_string_piece.h", "third_party/quiche/src/spdy/platform/api/spdy_string_piece.h",
"third_party/quiche/src/spdy/platform/api/spdy_string_utils.h", "third_party/quiche/src/spdy/platform/api/spdy_string_utils.h",
"third_party/quiche/src/spdy/platform/api/spdy_unsafe_arena.h", "third_party/quiche/src/spdy/platform/api/spdy_unsafe_arena.h",
"url_request/data_protocol_handler.cc",
"url_request/data_protocol_handler.h",
"url_request/redirect_info.cc", "url_request/redirect_info.cc",
"url_request/redirect_info.h", "url_request/redirect_info.h",
"url_request/redirect_util.cc", "url_request/redirect_util.cc",
...@@ -2853,6 +2851,8 @@ static_library("test_support") { ...@@ -2853,6 +2851,8 @@ static_library("test_support") {
"test/url_request/url_request_mock_data_job.h", "test/url_request/url_request_mock_data_job.h",
"test/url_request/url_request_slow_download_job.cc", "test/url_request/url_request_slow_download_job.cc",
"test/url_request/url_request_slow_download_job.h", "test/url_request/url_request_slow_download_job.h",
"url_request/data_protocol_handler.cc",
"url_request/data_protocol_handler.h",
"url_request/test_url_fetcher_factory.cc", "url_request/test_url_fetcher_factory.cc",
"url_request/test_url_fetcher_factory.h", "url_request/test_url_fetcher_factory.h",
"url_request/url_request_test_util.cc", "url_request/url_request_test_util.cc",
......
...@@ -15,8 +15,8 @@ namespace net { ...@@ -15,8 +15,8 @@ namespace net {
class URLRequestJob; class URLRequestJob;
// Implements a ProtocolHandler for Data jobs. // Implements a ProtocolHandler for Data jobs.
class NET_EXPORT DataProtocolHandler // TODO(mmenke): This class is now only used in tests. Remove it.
: public URLRequestJobFactory::ProtocolHandler { class DataProtocolHandler : public URLRequestJobFactory::ProtocolHandler {
public: public:
DataProtocolHandler(); DataProtocolHandler();
URLRequestJob* MaybeCreateJob( URLRequestJob* MaybeCreateJob(
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include "net/nqe/network_quality_estimator.h" #include "net/nqe/network_quality_estimator.h"
#include "net/quic/quic_stream_factory.h" #include "net/quic/quic_stream_factory.h"
#include "net/ssl/ssl_config_service_defaults.h" #include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/data_protocol_handler.h"
#include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h" #include "net/url_request/url_request_context_storage.h"
...@@ -610,17 +609,13 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() { ...@@ -610,17 +609,13 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl; URLRequestJobFactoryImpl* job_factory = new URLRequestJobFactoryImpl;
// Adds caller-provided protocol handlers first so that these handlers are // Adds caller-provided protocol handlers first so that these handlers are
// used over data/file/ftp handlers below. // used over the ftp handler below.
for (auto& scheme_handler : protocol_handlers_) { for (auto& scheme_handler : protocol_handlers_) {
job_factory->SetProtocolHandler(scheme_handler.first, job_factory->SetProtocolHandler(scheme_handler.first,
std::move(scheme_handler.second)); std::move(scheme_handler.second));
} }
protocol_handlers_.clear(); protocol_handlers_.clear();
if (data_enabled_)
job_factory->SetProtocolHandler(url::kDataScheme,
std::make_unique<DataProtocolHandler>());
#if !BUILDFLAG(DISABLE_FTP_SUPPORT) #if !BUILDFLAG(DISABLE_FTP_SUPPORT)
if (ftp_enabled_) { if (ftp_enabled_) {
storage->set_ftp_auth_cache(std::make_unique<FtpAuthCache>()); storage->set_ftp_auth_cache(std::make_unique<FtpAuthCache>());
......
...@@ -195,9 +195,6 @@ class NET_EXPORT URLRequestContextBuilder { ...@@ -195,9 +195,6 @@ class NET_EXPORT URLRequestContextBuilder {
void set_http_user_agent_settings( void set_http_user_agent_settings(
std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings); std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings);
// Control support for data:// requests. By default it's disabled.
void set_data_enabled(bool enable) { data_enabled_ = enable; }
#if !BUILDFLAG(DISABLE_FTP_SUPPORT) #if !BUILDFLAG(DISABLE_FTP_SUPPORT)
// Control support for ftp:// requests. By default it's disabled. // Control support for ftp:// requests. By default it's disabled.
void set_ftp_enabled(bool enable) { ftp_enabled_ = enable; } void set_ftp_enabled(bool enable) { ftp_enabled_ = enable; }
...@@ -357,8 +354,6 @@ class NET_EXPORT URLRequestContextBuilder { ...@@ -357,8 +354,6 @@ class NET_EXPORT URLRequestContextBuilder {
std::string user_agent_; std::string user_agent_;
std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings_; std::unique_ptr<HttpUserAgentSettings> http_user_agent_settings_;
// Include support for data:// requests.
bool data_enabled_ = false;
#if !BUILDFLAG(DISABLE_FTP_SUPPORT) #if !BUILDFLAG(DISABLE_FTP_SUPPORT)
// Include support for ftp:// requests. // Include support for ftp:// requests.
bool ftp_enabled_ = false; bool ftp_enabled_ = false;
......
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