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

Unified Diff: ios/crnet/CrNet.h

Issue 1773853003: Revert of Remove support for Alt-Svc/Alternate Protocol Probability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | ios/crnet/CrNet.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/CrNet.h
diff --git a/ios/crnet/CrNet.h b/ios/crnet/CrNet.h
index 043ee6e62406c3d79ab1384c35440208499db467..2fbb48f2ff139390886eb1952d07eb326ff3cf5c 100644
--- a/ios/crnet/CrNet.h
+++ b/ios/crnet/CrNet.h
@@ -34,6 +34,29 @@
// nil, persistence is not enabled. The default is for SDCH to be disabled.
+ (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
« no previous file with comments | « ios/chrome/browser/ios_chrome_io_thread.mm ('k') | ios/crnet/CrNet.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698