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

Unified Diff: net/ssl/ssl_socket_config_service.h

Issue 869393005: Perform ClientHello padding if the field trial is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@net_connection_error_uma
Patch Set: Created 5 years, 11 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
Index: net/ssl/ssl_socket_config_service.h
diff --git a/net/ssl/ssl_socket_config_service.h b/net/ssl/ssl_socket_config_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..047ced7fcedea0ccb8bc82c77223ff184c27b50b
--- /dev/null
+++ b/net/ssl/ssl_socket_config_service.h
@@ -0,0 +1,41 @@
+// Copyright (c) 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.
+
+#ifndef NET_SSL_SSL_SOCKET_CONFIG_SERVICE_H_
+#define NET_SSL_SSL_SOCKET_CONFIG_SERVICE_H_
+
+#include "base/macros.h"
+#include "net/base/net_export.h"
+
+namespace net {
+
+class HostPortPair;
+
+class NET_EXPORT SSLSocketConfigService {
+ public:
+ SSLSocketConfigService() : enabled_(false) {}
+ virtual ~SSLSocketConfigService() {}
+
+ // Enables fast radio padding.
+ void EnableFastRadioPadding();
+ // Disables fast radio padding.
+ void DisableFastRadioPadding();
Ryan Sleevi 2015/01/30 22:11:32 Why isn't this a single function with a bool arg?
+
+ // Checks to see whether the socket should be configured to use ClientHello
+ // padding.
+ bool UseFastRadioPadding(const HostPortPair& host_and_port);
+
+ // Returns whether this is a Google host/port or not. Matches host/port
+ // logic in ssl_client_socket_pool.cc
Ryan Sleevi 2015/01/30 22:11:32 This comment seems very much a layering violation.
+ virtual bool IsGoogle(const HostPortPair& host_and_port);
Ryan Sleevi 2015/01/30 22:11:32 Why is this virtual? "For Testing"?
+
+ private:
+ bool enabled_;
+
+ DISALLOW_COPY_AND_ASSIGN(SSLSocketConfigService);
+};
+
+} // namespace net
+
+#endif // NET_SSL_SSL_SOCKET_CONFIG_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698