Index: net/websockets/websocket_deflate_parameters.h |
diff --git a/net/websockets/websocket_deflate_parameters.h b/net/websockets/websocket_deflate_parameters.h |
index 11f896741ab1fa51650f97d3efd69e4ef30a8f24..92e616cd98592c7176597cf050329342dd6999ea 100644 |
--- a/net/websockets/websocket_deflate_parameters.h |
+++ b/net/websockets/websocket_deflate_parameters.h |
@@ -93,6 +93,13 @@ class NET_EXPORT_PRIVATE WebSocketDeflateParameters { |
client_max_window_bits_ = WindowBits(bits, true, true); |
} |
+ int PermissiveServerMaxWindowBits() const { |
+ return server_max_window_bits_.PermissiveBits(); |
+ } |
+ int PermissiveClientMaxWindowBits() const { |
+ return client_max_window_bits_.PermissiveBits(); |
+ } |
+ |
// Return true if |bits| is valid as a max_window_bits value. |
static bool IsValidWindowBits(int bits) { return 8 <= bits && bits <= 15; } |
@@ -102,6 +109,8 @@ class NET_EXPORT_PRIVATE WebSocketDeflateParameters { |
WindowBits(int16 bits, bool is_specified, bool has_value) |
: bits(bits), is_specified(is_specified), has_value(has_value) {} |
+ int PermissiveBits() const { return is_specified && has_value ? bits : 15; } |
+ |
int16 bits; |
// True when "window bits" parameter appears in the parameters. |
bool is_specified; |