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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 1431723002: Add brotli content-encoding filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaseline Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "net/cert/multi_log_ct_verifier.h" 73 #include "net/cert/multi_log_ct_verifier.h"
74 #include "net/cert/multi_threaded_cert_verifier.h" 74 #include "net/cert/multi_threaded_cert_verifier.h"
75 #include "net/cookies/cookie_store.h" 75 #include "net/cookies/cookie_store.h"
76 #include "net/dns/host_cache.h" 76 #include "net/dns/host_cache.h"
77 #include "net/dns/host_resolver.h" 77 #include "net/dns/host_resolver.h"
78 #include "net/dns/mapped_host_resolver.h" 78 #include "net/dns/mapped_host_resolver.h"
79 #include "net/ftp/ftp_network_layer.h" 79 #include "net/ftp/ftp_network_layer.h"
80 #include "net/http/http_auth_filter.h" 80 #include "net/http/http_auth_filter.h"
81 #include "net/http/http_auth_handler_factory.h" 81 #include "net/http/http_auth_handler_factory.h"
82 #include "net/http/http_auth_preferences.h" 82 #include "net/http/http_auth_preferences.h"
83 #include "net/http/http_features.h"
83 #include "net/http/http_network_layer.h" 84 #include "net/http/http_network_layer.h"
84 #include "net/http/http_network_session.h" 85 #include "net/http/http_network_session.h"
85 #include "net/http/http_server_properties_impl.h" 86 #include "net/http/http_server_properties_impl.h"
86 #include "net/proxy/proxy_config_service.h" 87 #include "net/proxy/proxy_config_service.h"
87 #include "net/proxy/proxy_script_fetcher_impl.h" 88 #include "net/proxy/proxy_script_fetcher_impl.h"
88 #include "net/proxy/proxy_service.h" 89 #include "net/proxy/proxy_service.h"
89 #include "net/quic/crypto/crypto_protocol.h" 90 #include "net/quic/crypto/crypto_protocol.h"
90 #include "net/quic/quic_protocol.h" 91 #include "net/quic/quic_protocol.h"
91 #include "net/quic/quic_utils.h" 92 #include "net/quic/quic_utils.h"
92 #include "net/socket/ssl_client_socket.h" 93 #include "net/socket/ssl_client_socket.h"
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 838 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
838 // is fixed. 839 // is fixed.
839 tracked_objects::ScopedTracker tracking_profile12_5( 840 tracked_objects::ScopedTracker tracking_profile12_5(
840 FROM_HERE_WITH_EXPLICIT_FUNCTION( 841 FROM_HERE_WITH_EXPLICIT_FUNCTION(
841 "466432 IOThread::InitAsync::QuicConfiguration")); 842 "466432 IOThread::InitAsync::QuicConfiguration"));
842 ConfigureQuic(command_line); 843 ConfigureQuic(command_line);
843 if (command_line.HasSwitch( 844 if (command_line.HasSwitch(
844 switches::kEnableUserAlternateProtocolPorts)) { 845 switches::kEnableUserAlternateProtocolPorts)) {
845 globals_->enable_user_alternate_protocol_ports = true; 846 globals_->enable_user_alternate_protocol_ports = true;
846 } 847 }
848 globals_->enable_brotli.set(
849 base::FeatureList::IsEnabled(net::features::kBrotliEncodingFeature));
847 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 850 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
848 // is fixed. 851 // is fixed.
849 tracked_objects::ScopedTracker tracking_profile13( 852 tracked_objects::ScopedTracker tracking_profile13(
850 FROM_HERE_WITH_EXPLICIT_FUNCTION( 853 FROM_HERE_WITH_EXPLICIT_FUNCTION(
851 "466432 IOThread::InitAsync::InitializeNetworkOptions")); 854 "466432 IOThread::InitAsync::InitializeNetworkOptions"));
852 InitializeNetworkOptions(command_line); 855 InitializeNetworkOptions(command_line);
853 856
854 TRACE_EVENT_BEGIN0("startup", 857 TRACE_EVENT_BEGIN0("startup",
855 "IOThread::Init:ProxyScriptFetcherRequestContext"); 858 "IOThread::Init:ProxyScriptFetcherRequestContext");
856 globals_->proxy_script_fetcher_context.reset( 859 globals_->proxy_script_fetcher_context.reset(
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 params->next_protos = globals.next_protos; 1134 params->next_protos = globals.next_protos;
1132 globals.trusted_spdy_proxy.CopyToIfSet(&params->trusted_spdy_proxy); 1135 globals.trusted_spdy_proxy.CopyToIfSet(&params->trusted_spdy_proxy);
1133 params->forced_spdy_exclusions = globals.forced_spdy_exclusions; 1136 params->forced_spdy_exclusions = globals.forced_spdy_exclusions;
1134 globals.use_alternative_services.CopyToIfSet( 1137 globals.use_alternative_services.CopyToIfSet(
1135 &params->use_alternative_services); 1138 &params->use_alternative_services);
1136 globals.alternative_service_probability_threshold.CopyToIfSet( 1139 globals.alternative_service_probability_threshold.CopyToIfSet(
1137 &params->alternative_service_probability_threshold); 1140 &params->alternative_service_probability_threshold);
1138 1141
1139 globals.enable_npn.CopyToIfSet(&params->enable_npn); 1142 globals.enable_npn.CopyToIfSet(&params->enable_npn);
1140 1143
1144 globals.enable_brotli.CopyToIfSet(&params->enable_brotli);
1145
1141 globals.enable_quic.CopyToIfSet(&params->enable_quic); 1146 globals.enable_quic.CopyToIfSet(&params->enable_quic);
1142 globals.enable_quic_for_proxies.CopyToIfSet(&params->enable_quic_for_proxies); 1147 globals.enable_quic_for_proxies.CopyToIfSet(&params->enable_quic_for_proxies);
1143 globals.quic_always_require_handshake_confirmation.CopyToIfSet( 1148 globals.quic_always_require_handshake_confirmation.CopyToIfSet(
1144 &params->quic_always_require_handshake_confirmation); 1149 &params->quic_always_require_handshake_confirmation);
1145 globals.quic_disable_connection_pooling.CopyToIfSet( 1150 globals.quic_disable_connection_pooling.CopyToIfSet(
1146 &params->quic_disable_connection_pooling); 1151 &params->quic_disable_connection_pooling);
1147 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet( 1152 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet(
1148 &params->quic_load_server_info_timeout_srtt_multiplier); 1153 &params->quic_load_server_info_timeout_srtt_multiplier);
1149 globals.quic_enable_connection_racing.CopyToIfSet( 1154 globals.quic_enable_connection_racing.CopyToIfSet(
1150 &params->quic_enable_connection_racing); 1155 &params->quic_enable_connection_racing);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 std::move(job_factory); 1748 std::move(job_factory);
1744 1749
1745 context->set_job_factory( 1750 context->set_job_factory(
1746 globals->proxy_script_fetcher_url_request_job_factory.get()); 1751 globals->proxy_script_fetcher_url_request_job_factory.get());
1747 1752
1748 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1753 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1749 // system URLRequestContext too. There's no reason this should be tied to a 1754 // system URLRequestContext too. There's no reason this should be tied to a
1750 // profile. 1755 // profile.
1751 return context; 1756 return context;
1752 } 1757 }
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.h ('k') | net/BUILD.gn » ('j') | net/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698