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

Unified Diff: net/http/http_features.cc

Issue 1431723002: Add brotli content-encoding filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use features instead of command line flags Created 5 years 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
Index: net/http/http_features.cc
diff --git a/net/http/http_features.cc b/net/http/http_features.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f430be361ee60c6f80f543fe8a9584fd871eca77
--- /dev/null
+++ b/net/http/http_features.cc
@@ -0,0 +1,25 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/http/http_features.h"
+
+namespace net {
+
+namespace features {
+
+// Enables brotli "Accept-Encooding" advertising and "Content-Encoding" support.
xunjieli 2015/12/14 16:02:27 Could you also link ietf draft here? http://www.ie
xunjieli 2015/12/14 16:02:27 nit: typo in Encoding
eustas 2015/12/14 17:39:45 Done.
eustas 2015/12/14 17:39:45 Done.
+const base::Feature kBrotliEncodingFeature = {
+ "brotli-encoding", base::FEATURE_DISABLED_BY_DEFAULT};
+
+bool IsBrotliEncodingEnabled() {
+#if !defined(DISABLE_BROTLI_SUPPORT)
+ return base::FeatureList::IsEnabled(kBrotliEncodingFeature);
+#else
+ return false;
+#endif
+}
+
+} // namespace features
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698