summaryrefslogtreecommitdiffstats
path: root/ios
diff options
context:
space:
mode:
authorrch <rch@chromium.org>2016-03-17 13:51:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-17 20:52:53 +0000
commitdc7b9058657530c2df23e4ab7b4b3b03f54cde5f (patch)
treeaa412d106dcec88227e9000e74c87a224182dce4 /ios
parentbd9d199b6daf57b7b304c5cd16d6a53cba8582f5 (diff)
downloadchromium_src-dc7b9058657530c2df23e4ab7b4b3b03f54cde5f.zip
chromium_src-dc7b9058657530c2df23e4ab7b4b3b03f54cde5f.tar.gz
chromium_src-dc7b9058657530c2df23e4ab7b4b3b03f54cde5f.tar.bz2
Remove support forAlt-Svc/Alternate Protocol Probability
Committed: https://crrev.com/dced4c771d25317d26a0f6e258c7b7f64d4e8eea Cr-Commit-Position: refs/heads/master@{#379652} Committed: https://crrev.com/740688bec5c66af00debe117b6d375ecd212e570 Cr-Commit-Position: refs/heads/master@{#381134} Review URL: https://codereview.chromium.org/1699653002 Cr-Commit-Position: refs/heads/master@{#381791}
Diffstat (limited to 'ios')
-rw-r--r--ios/chrome/browser/ios_chrome_io_thread.h6
-rw-r--r--ios/chrome/browser/ios_chrome_io_thread.mm30
-rw-r--r--ios/crnet/CrNet.h23
-rw-r--r--ios/crnet/CrNet.mm7
-rw-r--r--ios/crnet/crnet_consumer/crnet_consumer_app_delegate.mm2
-rw-r--r--ios/crnet/crnet_environment.h7
-rw-r--r--ios/crnet/crnet_environment.mm2
7 files changed, 0 insertions, 77 deletions
diff --git a/ios/chrome/browser/ios_chrome_io_thread.h b/ios/chrome/browser/ios_chrome_io_thread.h
index f300a7f..17c7faa 100644
--- a/ios/chrome/browser/ios_chrome_io_thread.h
+++ b/ios/chrome/browser/ios_chrome_io_thread.h
@@ -138,7 +138,6 @@ class IOSChromeIOThread : public web::WebThreadDelegate {
Optional<bool> enable_http2;
Optional<bool> parse_alternative_services;
Optional<bool> enable_alternative_service_with_different_host;
- Optional<double> alternative_service_probability_threshold;
Optional<bool> enable_npn;
@@ -350,11 +349,6 @@ class IOSChromeIOThread : public web::WebThreadDelegate {
static net::QuicTagVector GetQuicConnectionOptions(
const VariationParameters& quic_trial_params);
- // Returns the alternative service probability threshold specified by
- // any flags in |quic_trial_params|.
- static double GetAlternativeProtocolProbabilityThreshold(
- const VariationParameters& quic_trial_params);
-
static net::URLRequestContext* ConstructSystemRequestContext(
Globals* globals,
net::NetLog* net_log);
diff --git a/ios/chrome/browser/ios_chrome_io_thread.mm b/ios/chrome/browser/ios_chrome_io_thread.mm
index ef492dc..0fbdab0 100644
--- a/ios/chrome/browser/ios_chrome_io_thread.mm
+++ b/ios/chrome/browser/ios_chrome_io_thread.mm
@@ -634,8 +634,6 @@ void IOSChromeIOThread::InitializeNetworkSessionParamsFromGlobals(
&params->parse_alternative_services);
globals.enable_alternative_service_with_different_host.CopyToIfSet(
&params->enable_alternative_service_with_different_host);
- globals.alternative_service_probability_threshold.CopyToIfSet(
- &params->alternative_service_probability_threshold);
globals.enable_npn.CopyToIfSet(&params->enable_npn);
@@ -806,14 +804,6 @@ void IOSChromeIOThread::ConfigureQuicGlobals(
supported_versions.push_back(version);
globals->quic_supported_versions.set(supported_versions);
}
-
- double threshold =
- GetAlternativeProtocolProbabilityThreshold(quic_trial_params);
- if (threshold >= 0 && threshold <= 1) {
- globals->alternative_service_probability_threshold.set(threshold);
- globals->http_server_properties->SetAlternativeServiceProbabilityThreshold(
- threshold);
- }
}
bool IOSChromeIOThread::ShouldEnableQuic(base::StringPiece quic_trial_group) {
@@ -842,26 +832,6 @@ net::QuicTagVector IOSChromeIOThread::GetQuicConnectionOptions(
return net::QuicUtils::ParseQuicConnectionOptions(it->second);
}
-double IOSChromeIOThread::GetAlternativeProtocolProbabilityThreshold(
- const VariationParameters& quic_trial_params) {
- double value;
- // TODO(bnc): Remove when new parameter name rolls out and server
- // configuration is changed.
- if (base::StringToDouble(
- GetVariationParam(quic_trial_params,
- "alternate_protocol_probability_threshold"),
- &value)) {
- return value;
- }
- if (base::StringToDouble(
- GetVariationParam(quic_trial_params,
- "alternative_service_probability_threshold"),
- &value)) {
- return value;
- }
- return -1;
-}
-
bool IOSChromeIOThread::ShouldQuicAlwaysRequireHandshakeConfirmation(
const VariationParameters& quic_trial_params) {
return base::LowerCaseEqualsASCII(
diff --git a/ios/crnet/CrNet.h b/ios/crnet/CrNet.h
index 2fbb48f2..043ee6e 100644
--- a/ios/crnet/CrNet.h
+++ b/ios/crnet/CrNet.h
@@ -35,29 +35,6 @@ typedef void(^ClearCacheCallback)(int errorCode);
+ (void)setSDCHEnabled:(BOOL)sdchEnabled
withPrefStore:(NSString*)filename;
-// Set the alternate protocol threshold. Servers announce alternate protocols
-// with a probability value; any alternate protocol whose probability value is
-// greater than this value will be used, so |alternateProtocolThreshold| == 0
-// implies any announced alternate protocol will be used, and
-// |alternateProtocolThreshold| == 1 implies no alternate protocol will ever be
-// used. Note that individual alternate protocols must also be individually
-// enabled to be considered; currently the only alternate protocol is QUIC (SPDY
-// is not controlled by this mechanism).
-//
-// For example, imagine your service has two frontends a.service.com and
-// b.service.com, and you would like to divide your users into three classes:
-// Users who use QUIC for both a and b
-// Users who use QUIC for a but not b
-// Users who use QUIC for neither a nor b
-// You can achieve that effect with:
-// a.service.com advertises QUIC with p=0.67
-// b.service.com advertises QUIC with p=0.33
-// alternateProtocolThreshold set to a uniform random number in [0,1]
-// Now equal proportions of users will fall into the three experimental groups.
-//
-// The default for this value is 1.0, i.e. all alternate protocols disabled.
-+ (void)setAlternateProtocolThreshold:(double)alternateProtocolThreshold;
-
// |userAgent| is expected to be of the form Product/Version.
// Example: Foo/3.0.0.0
//
diff --git a/ios/crnet/CrNet.mm b/ios/crnet/CrNet.mm
index 2c91094..0347344 100644
--- a/ios/crnet/CrNet.mm
+++ b/ios/crnet/CrNet.mm
@@ -16,7 +16,6 @@ static BOOL g_quic_enabled = NO;
static BOOL g_sdch_enabled = NO;
static NSString* g_user_agent = nil;
static NSString* g_sdch_pref_store_filename = nil;
-static double g_alternate_protocol_threshold = 1.0;
static RequestFilterBlock g_request_filter_block = nil;
@implementation CrNet
@@ -39,10 +38,6 @@ static RequestFilterBlock g_request_filter_block = nil;
g_user_agent = userAgent;
}
-+ (void)setAlternateProtocolThreshold:(double)alternateProtocolThreshold {
- g_alternate_protocol_threshold = alternateProtocolThreshold;
-}
-
+ (void)installInternal {
CrNetEnvironment::Initialize();
std::string partial_user_agent = base::SysNSStringToUTF8(g_user_agent);
@@ -55,8 +50,6 @@ static RequestFilterBlock g_request_filter_block = nil;
std::string filename = base::SysNSStringToUTF8(g_sdch_pref_store_filename);
g_chrome_net->set_sdch_pref_store_filename(filename);
}
- g_chrome_net->set_alternate_protocol_threshold(
- g_alternate_protocol_threshold);
g_chrome_net->Install();
g_chrome_net->SetHTTPProtocolHandlerRegistered(true);
diff --git a/ios/crnet/crnet_consumer/crnet_consumer_app_delegate.mm b/ios/crnet/crnet_consumer/crnet_consumer_app_delegate.mm
index ca44848..b224eda 100644
--- a/ios/crnet/crnet_consumer/crnet_consumer_app_delegate.mm
+++ b/ios/crnet/crnet_consumer/crnet_consumer_app_delegate.mm
@@ -45,8 +45,6 @@
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
[CrNet setPartialUserAgent:@"Dummy/1.0"];
[CrNet setQuicEnabled:YES];
- // Always use QUIC if able.
- [CrNet setAlternateProtocolThreshold:0.0];
[CrNet setSDCHEnabled:YES withPrefStore:[self SDCHPrefStoreFileName]];
[CrNet install];
[CrNet startNetLogToFile:[self currentNetLogFileName] logBytes:NO];
diff --git a/ios/crnet/crnet_environment.h b/ios/crnet/crnet_environment.h
index a0b49c1..5a698897 100644
--- a/ios/crnet/crnet_environment.h
+++ b/ios/crnet/crnet_environment.h
@@ -93,16 +93,10 @@ class CrNetEnvironment {
void set_sdch_pref_store_filename(const std::string& pref_store) {
sdch_pref_store_filename_ = pref_store;
}
- void set_alternate_protocol_threshold(double threshold) {
- alternate_protocol_threshold_ = threshold;
- }
bool spdy_enabled() const { return spdy_enabled_; }
bool quic_enabled() const { return quic_enabled_; }
bool sdch_enabled() const { return sdch_enabled_; }
- double alternate_protocol_threshold() const {
- return alternate_protocol_threshold_;
- }
// Clears the network stack's disk cache.
void ClearCache(ClearCacheCallback callback);
@@ -142,7 +136,6 @@ class CrNetEnvironment {
bool quic_enabled_;
bool sdch_enabled_;
std::string sdch_pref_store_filename_;
- double alternate_protocol_threshold_;
static CrNetEnvironment* chrome_net_;
scoped_ptr<base::Thread> network_io_thread_;
diff --git a/ios/crnet/crnet_environment.mm b/ios/crnet/crnet_environment.mm
index 128d76b..4b75a5a 100644
--- a/ios/crnet/crnet_environment.mm
+++ b/ios/crnet/crnet_environment.mm
@@ -445,8 +445,6 @@ void CrNetEnvironment::InitializeOnNetworkThread() {
params.enable_http2 = spdy_enabled();
params.parse_alternative_services = false;
params.enable_quic = quic_enabled();
- params.alternative_service_probability_threshold =
- alternate_protocol_threshold_;
if (!params.channel_id_service) {
// The main context may not have a ChannelIDService, since it is lazily