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

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: Addressed comments, moved feature declatation to content 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "components/data_usage/core/data_use_aggregator.h" 49 #include "components/data_usage/core/data_use_aggregator.h"
50 #include "components/data_usage/core/data_use_amortizer.h" 50 #include "components/data_usage/core/data_use_amortizer.h"
51 #include "components/data_usage/core/data_use_annotator.h" 51 #include "components/data_usage/core/data_use_annotator.h"
52 #include "components/net_log/chrome_net_log.h" 52 #include "components/net_log/chrome_net_log.h"
53 #include "components/policy/core/common/policy_service.h" 53 #include "components/policy/core/common/policy_service.h"
54 #include "components/proxy_config/pref_proxy_config_tracker.h" 54 #include "components/proxy_config/pref_proxy_config_tracker.h"
55 #include "components/variations/variations_associated_data.h" 55 #include "components/variations/variations_associated_data.h"
56 #include "components/version_info/version_info.h" 56 #include "components/version_info/version_info.h"
57 #include "content/public/browser/browser_thread.h" 57 #include "content/public/browser/browser_thread.h"
58 #include "content/public/browser/cookie_store_factory.h" 58 #include "content/public/browser/cookie_store_factory.h"
59 #include "content/public/common/content_features.h"
59 #include "content/public/common/content_switches.h" 60 #include "content/public/common/content_switches.h"
60 #include "content/public/common/user_agent.h" 61 #include "content/public/common/user_agent.h"
61 #include "net/base/external_estimate_provider.h" 62 #include "net/base/external_estimate_provider.h"
62 #include "net/base/host_mapping_rules.h" 63 #include "net/base/host_mapping_rules.h"
63 #include "net/base/net_util.h" 64 #include "net/base/net_util.h"
64 #include "net/base/network_quality_estimator.h" 65 #include "net/base/network_quality_estimator.h"
65 #include "net/base/sdch_manager.h" 66 #include "net/base/sdch_manager.h"
66 #include "net/cert/cert_policy_enforcer.h" 67 #include "net/cert/cert_policy_enforcer.h"
67 #include "net/cert/cert_verifier.h" 68 #include "net/cert/cert_verifier.h"
68 #include "net/cert/cert_verify_proc.h" 69 #include "net/cert/cert_verify_proc.h"
(...skipping 768 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(features::kBrotliEncoding));
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

Powered by Google App Engine
This is Rietveld 408576698