From fa94cb09e095a6d6c5634ae8543fc70145594c05 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Tue, 11 Apr 2017 15:59:15 +0200
Subject: [PATCH] Enable brotli

Enable brotli if enabled in content features (which it is by default).

Task-number: QTBUG-60049
Change-Id: I67ee51be47de4df0960e378f74c323ef30a7b25a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
---
 src/core/url_request_context_getter_qt.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index e6314039a..561b3c2b0 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -46,6 +46,7 @@
 #include "base/threading/sequenced_worker_pool.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/cookie_store_factory.h"
+#include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "net/base/cache_type.h"
 #include "net/cert/cert_verifier.h"
@@ -147,6 +148,7 @@ net::URLRequestContext *URLRequestContextGetterQt::GetURLRequestContext()
 
         m_networkDelegate.reset(new NetworkDelegateQt(this));
         m_urlRequestContext->set_network_delegate(m_networkDelegate.get());
+        m_urlRequestContext->set_enable_brotli(base::FeatureList::IsEnabled(features::kBrotliEncoding));
 
         QMutexLocker lock(&m_mutex);
         generateAllStorage();
-- 
GitLab