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

Unified Diff: ios/crnet/CrNet.mm

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/crnet/CrNet.h ('k') | ios/crnet/crnet_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/crnet/CrNet.mm
diff --git a/ios/crnet/CrNet.mm b/ios/crnet/CrNet.mm
index 0347344491698e5cc026845f2628dd3fe3363d0a..2c910943501efe5cd7b5e155ce4d04a96159f8bf 100644
--- a/ios/crnet/CrNet.mm
+++ b/ios/crnet/CrNet.mm
@@ -16,6 +16,7 @@
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
@@ -38,6 +39,10 @@
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);
@@ -50,6 +55,8 @@
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);
« no previous file with comments | « ios/crnet/CrNet.h ('k') | ios/crnet/crnet_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698