| 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);
|
|
|