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

Side by Side Diff: ios/chrome/browser/ios_chrome_io_thread.mm

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make bi-directional stream unittests enable priority->dependency setting. Created 4 years, 9 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
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.h ('k') | net/http/bidirectional_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/ios_chrome_io_thread.h" 5 #include "ios/chrome/browser/ios_chrome_io_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Field trial for network quality estimator. Seeds RTT and downstream 130 // Field trial for network quality estimator. Seeds RTT and downstream
131 // throughput observations with values that correspond to the connection type 131 // throughput observations with values that correspond to the connection type
132 // determined by the operating system. 132 // determined by the operating system.
133 const char kNetworkQualityEstimatorFieldTrialName[] = "NetworkQualityEstimator"; 133 const char kNetworkQualityEstimatorFieldTrialName[] = "NetworkQualityEstimator";
134 134
135 // Field trial for NPN. 135 // Field trial for NPN.
136 const char kNpnTrialName[] = "NPN"; 136 const char kNpnTrialName[] = "NPN";
137 const char kNpnTrialEnabledGroupNamePrefix[] = "Enable"; 137 const char kNpnTrialEnabledGroupNamePrefix[] = "Enable";
138 const char kNpnTrialDisabledGroupNamePrefix[] = "Disable"; 138 const char kNpnTrialDisabledGroupNamePrefix[] = "Disable";
139 139
140 // Field trial for priority dependencies.
141 const char kSpdyDependenciesFieldTrial[] = "SpdyEnableDependencies";
142 const char kSpdyDependenciesFieldTrialEnable[] = "Enable";
143 const char kSpdyDepencenciesFieldTrialDisable[] = "Disable";
144
140 // Used for the "system" URLRequestContext. 145 // Used for the "system" URLRequestContext.
141 class SystemURLRequestContext : public net::URLRequestContext { 146 class SystemURLRequestContext : public net::URLRequestContext {
142 public: 147 public:
143 SystemURLRequestContext() { 148 SystemURLRequestContext() {
144 #if defined(USE_NSS_VERIFIER) 149 #if defined(USE_NSS_VERIFIER)
145 net::SetURLRequestContextForNSSHttpIO(this); 150 net::SetURLRequestContextForNSSHttpIO(this);
146 #endif 151 #endif
147 } 152 }
148 153
149 private: 154 private:
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 globals_->testing_fixed_http_port = 453 globals_->testing_fixed_http_port =
449 GetSwitchValueAsInt(command_line, switches::kIOSTestingFixedHttpPort); 454 GetSwitchValueAsInt(command_line, switches::kIOSTestingFixedHttpPort);
450 } 455 }
451 if (command_line.HasSwitch(switches::kIOSTestingFixedHttpsPort)) { 456 if (command_line.HasSwitch(switches::kIOSTestingFixedHttpsPort)) {
452 globals_->testing_fixed_https_port = 457 globals_->testing_fixed_https_port =
453 GetSwitchValueAsInt(command_line, switches::kIOSTestingFixedHttpsPort); 458 GetSwitchValueAsInt(command_line, switches::kIOSTestingFixedHttpsPort);
454 } 459 }
455 ConfigureAltSvcGlobals( 460 ConfigureAltSvcGlobals(
456 base::FieldTrialList::FindFullName(kAltSvcFieldTrialName), globals_); 461 base::FieldTrialList::FindFullName(kAltSvcFieldTrialName), globals_);
457 ConfigureQuic(); 462 ConfigureQuic();
463 ConfigurePriorityDependencies();
458 InitializeNetworkOptions(); 464 InitializeNetworkOptions();
459 465
460 const version_info::Channel channel = ::GetChannel(); 466 const version_info::Channel channel = ::GetChannel();
461 if (channel == version_info::Channel::UNKNOWN || 467 if (channel == version_info::Channel::UNKNOWN ||
462 channel == version_info::Channel::CANARY || 468 channel == version_info::Channel::CANARY ||
463 channel == version_info::Channel::DEV) { 469 channel == version_info::Channel::DEV) {
464 globals_->url_request_backoff_manager.reset( 470 globals_->url_request_backoff_manager.reset(
465 new net::URLRequestBackoffManager()); 471 new net::URLRequestBackoffManager());
466 } 472 }
467 473
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 646
641 globals.enable_spdy31.CopyToIfSet(&params->enable_spdy31); 647 globals.enable_spdy31.CopyToIfSet(&params->enable_spdy31);
642 globals.enable_http2.CopyToIfSet(&params->enable_http2); 648 globals.enable_http2.CopyToIfSet(&params->enable_http2);
643 globals.parse_alternative_services.CopyToIfSet( 649 globals.parse_alternative_services.CopyToIfSet(
644 &params->parse_alternative_services); 650 &params->parse_alternative_services);
645 globals.enable_alternative_service_with_different_host.CopyToIfSet( 651 globals.enable_alternative_service_with_different_host.CopyToIfSet(
646 &params->enable_alternative_service_with_different_host); 652 &params->enable_alternative_service_with_different_host);
647 653
648 globals.enable_npn.CopyToIfSet(&params->enable_npn); 654 globals.enable_npn.CopyToIfSet(&params->enable_npn);
649 655
656 globals.enable_priority_dependencies.CopyToIfSet(
657 &params->enable_priority_dependencies);
658
650 globals.enable_quic.CopyToIfSet(&params->enable_quic); 659 globals.enable_quic.CopyToIfSet(&params->enable_quic);
651 globals.enable_quic_for_proxies.CopyToIfSet(&params->enable_quic_for_proxies); 660 globals.enable_quic_for_proxies.CopyToIfSet(&params->enable_quic_for_proxies);
652 globals.quic_always_require_handshake_confirmation.CopyToIfSet( 661 globals.quic_always_require_handshake_confirmation.CopyToIfSet(
653 &params->quic_always_require_handshake_confirmation); 662 &params->quic_always_require_handshake_confirmation);
654 globals.quic_disable_connection_pooling.CopyToIfSet( 663 globals.quic_disable_connection_pooling.CopyToIfSet(
655 &params->quic_disable_connection_pooling); 664 &params->quic_disable_connection_pooling);
656 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet( 665 globals.quic_load_server_info_timeout_srtt_multiplier.CopyToIfSet(
657 &params->quic_load_server_info_timeout_srtt_multiplier); 666 &params->quic_load_server_info_timeout_srtt_multiplier);
658 globals.quic_enable_connection_racing.CopyToIfSet( 667 globals.quic_enable_connection_racing.CopyToIfSet(
659 &params->quic_enable_connection_racing); 668 &params->quic_enable_connection_racing);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 DCHECK(system_proxy_config_service_.get()); 729 DCHECK(system_proxy_config_service_.get());
721 730
722 globals_->system_proxy_service = ios::ProxyServiceFactory::CreateProxyService( 731 globals_->system_proxy_service = ios::ProxyServiceFactory::CreateProxyService(
723 net_log_, nullptr, globals_->system_network_delegate.get(), 732 net_log_, nullptr, globals_->system_network_delegate.get(),
724 std::move(system_proxy_config_service_), true /* quick_check_enabled */); 733 std::move(system_proxy_config_service_), true /* quick_check_enabled */);
725 734
726 globals_->system_request_context.reset( 735 globals_->system_request_context.reset(
727 ConstructSystemRequestContext(globals_, net_log_)); 736 ConstructSystemRequestContext(globals_, net_log_));
728 } 737 }
729 738
739 void IOSChromeIOThread::ConfigurePriorityDependencies() {
740 std::string group =
741 base::FieldTrialList::FindFullName(kSpdyDependenciesFieldTrial);
742 if (group == kSpdyDependenciesFieldTrialEnable) {
743 globals_->enable_priority_dependencies.set(true);
744 } else if (group == kSpdyDepencenciesFieldTrialDisable) {
745 globals_->enable_priority_dependencies.set(false);
746 }
747 }
748
730 void IOSChromeIOThread::ConfigureQuic() { 749 void IOSChromeIOThread::ConfigureQuic() {
731 // Always fetch the field trial group to ensure it is reported correctly. 750 // Always fetch the field trial group to ensure it is reported correctly.
732 // The command line flags will be associated with a group that is reported 751 // The command line flags will be associated with a group that is reported
733 // so long as trial is actually queried. 752 // so long as trial is actually queried.
734 std::string group = base::FieldTrialList::FindFullName(kQuicFieldTrialName); 753 std::string group = base::FieldTrialList::FindFullName(kQuicFieldTrialName);
735 VariationParameters params; 754 VariationParameters params;
736 if (!variations::GetVariationParams(kQuicFieldTrialName, &params)) { 755 if (!variations::GetVariationParams(kQuicFieldTrialName, &params)) {
737 params.clear(); 756 params.clear();
738 } 757 }
739 758
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 1043
1025 globals->system_http_network_session.reset( 1044 globals->system_http_network_session.reset(
1026 new net::HttpNetworkSession(system_params)); 1045 new net::HttpNetworkSession(system_params));
1027 globals->system_http_transaction_factory.reset( 1046 globals->system_http_transaction_factory.reset(
1028 new net::HttpNetworkLayer(globals->system_http_network_session.get())); 1047 new net::HttpNetworkLayer(globals->system_http_network_session.get()));
1029 context->set_http_transaction_factory( 1048 context->set_http_transaction_factory(
1030 globals->system_http_transaction_factory.get()); 1049 globals->system_http_transaction_factory.get());
1031 1050
1032 return context; 1051 return context;
1033 } 1052 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.h ('k') | net/http/bidirectional_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698